Git Product home page Git Product logo

Comments (5)

tomlongridge avatar tomlongridge commented on June 15, 2024 1

Yes - I think it's achievable. I've raised it in our system to have a look at when priorities allow.

from bugsnag-java.

tomlongridge avatar tomlongridge commented on June 15, 2024

@nkavian - in your change, I believe the tests fail because Spring's DefaultHandlerExceptionResolver handles the error and so it would not make it to Bugsnag as the lowest priority handler.

In order to allow ControllerAdvice beans to swallow exceptions before the Bugsnag handler and also to catch exceptions thrown by these beans, it looks like we could make the BugsnagMvcExceptionHandler a ControllerAdvice bean with the lowest priority. (A helpful explanation of the mechanism is here.)

However, I believe this would only work for Spring MVC, and I'm not sure we could find a solution that would not risk the handler not firing for different use cases. Therefore you may wish to consider such an approach using a fork of this repo, but I believe we'd need a more general purpose approach to change the library itself.

from bugsnag-java.

nkavian avatar nkavian commented on June 15, 2024

Great link that's very detailed. Regarding your last paragraph, this issue is specific to Spring MVC and the suggested code change is to code within the bugsnag-spring folder, so there are no other use cases to be concerned with right?

from bugsnag-java.

tomlongridge avatar tomlongridge commented on June 15, 2024

The ControllerAdvice is relevant to a Spring web application but not to a Spring console application, for example.

from bugsnag-java.

nkavian avatar nkavian commented on June 15, 2024

I might have missed the nuance there, but that sounds like a good thing. This change would be to the Bugsnag MVC exception handler dealing with the Spring MVC.

https://github.com/nkavian/bugsnag-java/blob/master/bugsnag-spring/src/main/java/com/bugsnag/BugsnagMvcExceptionHandler.java#L22

from bugsnag-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.