-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove stacktrace in response when server throws BadMessageException #379
Remove stacktrace in response when server throws BadMessageException #379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see a test where the new exception mapper is invoked as a result of a REST call and then demonstrates that there's a JSON response.
@AndrewJSchofield I'm deploying this to a test cluster and will include the response for a REST request, would that be acceptable? |
I do see that the effect of this might be to make |
@AndrewJSchofield thanks for pointing out about kafka-rest, I'm testing this with kafka-rest atm, and it turns out the error is raised at a lower level than application, so using registerExceptionMappers doesn't work. Will update this PR and raise another PR for kafka-rest once I figure out the correct error handler. |
cf38afd
to
ad3128f
Compare
ad3128f
to
2c8f421
Compare
…ad of session context
2c8f421
to
3316f6a
Compare
@@ -309,10 +308,6 @@ public Handler configureHandler() { | |||
context.setBaseResource(staticResources); | |||
} | |||
|
|||
if (isErrorStackTraceSuppressionEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now moved to Server error handler
@AndrewJSchofield this PR should be ready to review now, I have added tests to validate that it should work (remove stack trace from error response). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This will make the response nicer, in term of no stack trace will show up for error on server