Closed jpcarpanezi closed 3 months ago
Hi @jpcarpanezi ! Welcome to Ocelot world! 🐯
We know about this problem of original status code overriding by Error Mapper... :disappointed: In docs we have this page: Error Status Codes
This is very ugly and redundant feature which behaves strange, and it breaks a lot of downstream services. We have to recover original status code and keep it in HTTP response. But custom Ocelot status can be moved to a new header.
Since you return immediately then previous middlewares override status. I recommend to add custom response header with the status value and forget about the problem. Also you could write formatted response body with data to parse on the client's side.
Expected Behavior
OcelotPipelineConfiguration
for custom pre or override middlewareActual Behavior
Steps to Reproduce the Problem
Add OcelotPipelineConfiguration in Startup.cs Configure method
Add pipeline to UseOcelot() method
await app.UseOcelot(configuration);
Specifications