Skip to content
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

Support for @ResponseStatus on custom exceptions #134

Open
peterkarrer opened this issue Feb 28, 2019 · 0 comments
Open

Support for @ResponseStatus on custom exceptions #134

peterkarrer opened this issue Feb 28, 2019 · 0 comments

Comments

@peterkarrer
Copy link

Expected behavior

When throwing an exception from a Controller/RestController that is annotated with @ResponseStatus with an HTTP status code in the 4xx range, the exception should be reported to Bugsnag with severity INFO.

Observed behavior

Custom exceptions annotated with @ResponseStatus are always reported with severity ERROR independent from the HTTP status that is set.
At the moment there is no code in ExceptionClassCallback that would handle such exceptions.

Steps to reproduce

  • Create a custom exception class with @ResponseStatus and an HTTP status in the 4xx range
  • Throw this exception from a Controller/RestController
  • The exception is shown with severity ERROR in Bugsnag

Version

bugsnag-spring 3.4.4

Additional information

Since we typically use custom exceptions for client errors, a fix to this problem would greatly improve our user experience with Bugsnag. Thanks for looking into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant