Description
Requests ending with unhandled exceptions are now persisted correctly, but the stored status code may still be incorrect.
Some requests resulting in 500 Internal Server Error are captured with status code 200 OK.
Expected
Requests ending with unhandled exceptions should store the final response status code (500).
Actual
Requests may be stored with status code 200 before the exception handling pipeline finalizes the response.
Possible Cause
context.Response.StatusCode is captured before the final exception middleware updates the response status.
Reproduction
Create endpoint throwing exception:
throw new Exception();
Open DebugProbe dashboard and inspect stored request status.
Screenshots

Description
Requests ending with unhandled exceptions are now persisted correctly, but the stored status code may still be incorrect.
Some requests resulting in 500 Internal Server Error are captured with status code 200 OK.
Expected
Requests ending with unhandled exceptions should store the final response status code (500).
Actual
Requests may be stored with status code 200 before the exception handling pipeline finalizes the response.
Possible Cause
context.Response.StatusCode is captured before the final exception middleware updates the response status.
Reproduction
Create endpoint throwing exception:
throw new Exception();
Open DebugProbe dashboard and inspect stored request status.
Screenshots