Skip to content

Unhandled exception requests (500) may be stored with incorrect 200 status code #9

@georgidhristov

Description

@georgidhristov

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

Image
Image

Metadata

Metadata

Labels

bugSomething isn't workinghelp wantedExtra attention is neededpriority: highCritical issue affecting functionality or user experience

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions