Comments (5)
Yes - I think it's achievable. I've raised it in our system to have a look at when priorities allow.
from bugsnag-java.
@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.
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.
The ControllerAdvice is relevant to a Spring web application but not to a Spring console application, for example.
from bugsnag-java.
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.
from bugsnag-java.
Related Issues (20)
- Steps to integrate Bugsnag to Java Openxava Web Framework HOT 1
- ConcurrentModificationException while call Bugsnag.notify() HOT 1
- Bugsnag prevents JVM from shutting down normally HOT 6
- Request tab includes cookies HOT 4
- Filtering is case sensitive which makes it insecure at filtering sensitive data HOT 3
- Support for Proxy Configuration HOT 1
- Support notification level callbacks HOT 4
- Upgrade jackson-databind dependency HOT 3
- Bugsnag.notify seems creating new HandshakeCompletedNotify-Thread each time HOT 1
- Freeze when initializing Bugsnag HOT 3
- Fix reported vulnerabilities HOT 3
- Migrate to JakartaEE HOT 6
- jackson-databind outdated HOT 3
- Spring Webflux integration HOT 1
- BugsnagServletContainerInitializer moved package during a minor version update HOT 2
- 3.7.0 is not available for java 8 HOT 2
- Filter unhandled exceptions by package HOT 1
- BugsnagImportSelector incorrectly selects "javax" classes in certain Java 21 scenarios HOT 2
- Options for client-side apps HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugsnag-java.