RequestLifecycle onErrorNoFilter default logging MDC propagation #12267
Unanswered
andrew-pirkl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all, I have a question about the RequestLifecycle and the way default error handling works. When a request goes through the
onErrorNoFilterfunction and has noerrorRouteorExceptionHandlerdefined, then the exception eventually logged through the call to createDefaultErrorResponseFlow doesn't include thePropagatedContextand so doesn't include any of the propagated MDC items.Is this by design, and is there a suggested way to make the MDC items available in that log? I tried creating a generic
ExceptionHandlerto handle all exceptions and log it there so it goes through handlerExceptionHandler and that correctly includes the MDC items in the logged exception, but I'd prefer to not have to have that custom handler.I did see there was a related bug fixed here: #11847
Beta Was this translation helpful? Give feedback.
All reactions