Task getting canceled #2282
Replies: 3 comments
-
It appears to be a transport level and protocol (scheme) error. Therefore, the downstream and HTTP version must be adjusted. Also, please provide P. Additionally, please conduct a clean experiment to verify the use case without the delegating handler by temporarily removing or disabling. This will allow you to ensure a direct connection to the downstream service. |
Beta Was this translation helpful? Give feedback.
-
Debug your custom middleware! 🤣 |
Beta Was this translation helpful? Give feedback.
-
If I would comment out the response header call in the DelegateHandler, the whole application works fine. So what I found is if the header name is not starting with "X-" then the application works fine. I am able to see the header element in the downstream calls. So I have updated the header element to "App-Version" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am using Ocelot 23.4.3 and Net8.0.
My requirement is very simple, for all downstream API calls I want to add a specific response header and value I have to retrieve from another service.
So, I have added the following Handler, and I am trying to add the header in the
HttpResponseMessage
object.I have registered the Handler as:
Important point is if I comment out this delegating handler my app works fine.
I have tried to add the response header in
OcelotPipelineConfiguration
. I have added it inPreErrorResponderMiddleware
afterawait next.Invoke();
But I get the same issue.Is there a better way to handle this?
Failed to get response:
Another exception I see is this:
Beta Was this translation helpful? Give feedback.
All reactions