DefaultServerRequestObservationConvention#outcome
tests whether the response is null, and if so, returns HTTP_OUTCOME_UNKNOWN
.
Otherwise, it gets the HttpOutcome
for the HttpStatusCode
for the HttpServletResponse#getStatus
.
Somehow, HttpServletResponse#getStatus
is coming through as zero in my application (I don't know what implementation of HttpServletResponse
this is - I can't see the code of the platform I'm running on - the implementations I can find default to 200), which causes HttpStatusCode#valueOf
to throw an
IllegalArgumentException: Status code '0' should be a three-digit positive integer
I propose that DefaultServerRequestObservationConvention#outcome
should catch this exception and return HTTP_OUTCOME_UNKNOWN
. I can make a pull request if you want.