Error handling with signalr #1919
-
Hello, I am using YARP for forwarding both http and WS. When using WS the connections can be very long lived and sometimes the connection to the client gets broken due to bad connections etc. When that is happening, I get an exception like this
That is not a problem for the client since the client is already gone, but i want to change the response code for logging in App Insight from 500 to 499. I tried that with UseExceptionHandler but it is not called as I would have expected. Any other place where I could change that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The status code can't be modified after the response has started (e.g. after the upgrade). I'm surprised you're even seeing a 500 in the logs? It should be a 101. |
Beta Was this translation helpful? Give feedback.
The status code can't be modified after the response has started (e.g. after the upgrade). I'm surprised you're even seeing a 500 in the logs? It should be a 101.