Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set error status in Observation Servlet filter
Prior to this commit, the Observation Servlet filter would record unhandled exceptions on the observation context but would leave the default HTTP response status as is. Servlet containers do set the response status in that case to 500 by default. Not doing that at the Servlet filter level results in invalid observations, stating that the HTTP response status is 200 (because the error status hasn't been set yet by the container) and as a result, the outcome is SUCCESS. This commit ensures that the error status is set in those cases, aligning the behavior with Servlet containers. Fixes gh-29512
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters