• Andy Wilkinson's avatar
    Record trace with response status of 500 following unhandled exception · 92100291
    Andy Wilkinson authored
    Previously, if the filter chain threw an unhandled exception,
    WebRequestTraceFilter would record a trace with a response status of
    200. This occurred because response.getStatus() would return 200 as
    the container had not yet caught the exception and mapped it to an
    error response.
    
    This commit updates WebRequestTraceFilter to align its behaviour with
    MetricsFilter. It now assumes that the response status will be a 500
    and only updates that to the status of the response if the call to the
    filter chain returns successfully.
    
    To avoid making a breaking change to the signature of the protected
    enhanceTrace method, an HttpServletResponseWrapper is used to include
    the correct status in the trace.
    
    Closes gh-5331
    92100291
Name
Last commit
Last update
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...