Comparing version 1.1.5 to 1.2.0
Changelog | ||
========= | ||
1.2.0 | ||
----- | ||
- Add restify support | ||
1.1.4 | ||
@@ -5,0 +9,0 @@ ----- |
@@ -94,2 +94,8 @@ var Bugsnag, BugsnagError, Configuration, Logger, Notification, Utils, domain, path, | ||
Bugsnag.restifyHandler = function(req, res, route, err) { | ||
return Bugsnag.notify(err, { | ||
req: req | ||
}); | ||
}; | ||
Bugsnag.intercept = function(cb) { | ||
@@ -96,0 +102,0 @@ if (!cb) { |
{ | ||
"name": "bugsnag", | ||
"description": "Bugsnag notifier for node.js scripts", | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"main": "./lib/bugsnag.js", | ||
@@ -6,0 +6,0 @@ "homepage": "http://bugsnag.com", |
@@ -50,3 +50,23 @@ Bugsnag Notifier for Node.js | ||
Using Restify | ||
------------- | ||
If your app uses [Restify](http://mcavage.me/node-restify/), Bugsnag can automatically capture errors that happen during requests. | ||
To get notified of the errors in your app, just add the Bugsnag restify handler to your code. | ||
```javascript | ||
server.on("uncaughtException", bugsnag.restifyHandler); | ||
``` | ||
If you don't use any other uncaughtException event listeners, you will need to add the default handler | ||
back in, like this. | ||
```javascript | ||
server.on("uncaughtException", function (req, res, route, e) { | ||
if (!res._headerSent) res.send(new restify.InternalError(e, e.message || 'unexpected error')); | ||
}); | ||
``` | ||
Using Coffeescript | ||
@@ -53,0 +73,0 @@ ------------------ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71845
584
333