This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 134
Installing Raven without a DSN causes it to swallow uncaught exceptions #301
Comments
As a workaround, for now, I'm doing: var Raven = require('raven');
var dsn = undefined;
Raven.config(dsn);
if (dsn) {
Raven.install(function (sentToSentry, err) {
console.error('Uncaught Error:', err.message);
process.exit(1);
});
}
throw new Error('oops'); |
This behavior is fixed after #308. Refer to this comment for a rundown of the new behavior. Please let me know if you have any other scenarios or use cases that the new behavior doesn't accommodate. |
Can we get a release with this fix? |
@francisdb will publish tomorrow as per #314 |
@francisdb 2.0.0 has been published |
Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Installing Raven without a DSN causes it to swallow uncaught exceptions. We do this in our dev environment. Here is some sample code that will show the failure:
Result:
Note it does not call my callback (which logs, then exits), and it does not exit the process.
(In this example, the process actually exits, but only because there's nothing else to do. In the real world if you're running an express server or something, the process will not exit).
What is the expected behavior?
It should call the provided callback with
sentToSentry=false
, thus allowing me to log the error and callprocess.exit(1);
The text was updated successfully, but these errors were encountered: