Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

airbrake

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airbrake - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

41

lib/airbrake.js

@@ -15,2 +15,3 @@ var HTTP_STATUS_CODES = require('http').STATUS_CODES;

util.inherits(Airbrake, EventEmitter);
function Airbrake() {

@@ -42,15 +43,18 @@ this.key = null;

Airbrake.prototype.expressHandler = function() {
Airbrake.prototype.expressHandler = function(disableUncaughtException) {
var self = this;
process.on('uncaughtException', function(err) {
self._onError(err, true)
});
if(!disableUncaughtException) {
process.on('uncaughtException', function(err) {
self._onError(err, true);
});
}
return function errorHandler(err, req, res, next) {
if (res.statusCode < 400) res.statusCode = 500;
err.url = req.url;
err.component = req.url;
err.action = req.method;
err.params = req.params;
err.params = JSON.stringify(req.body);
err.session = req.session;

@@ -60,4 +64,4 @@

next(err);
}
}
};
};

@@ -83,3 +87,3 @@ Airbrake.prototype._onError = function(err, die) {

});
}
};

@@ -89,3 +93,3 @@ Airbrake.prototype.handleExceptions = function() {

process.on('uncaughtException', function(err) {
self._onError(err, true)
self._onError(err, true);
});

@@ -213,3 +217,3 @@ };

.up()
.ele('backtrace')
.ele('backtrace');

@@ -221,3 +225,3 @@ trace.forEach(function(callSite) {

.att('file', callSite.getFileName() || '')
.att('number', callSite.getLineNumber() || '')
.att('number', callSite.getLineNumber() || '');
});

@@ -259,5 +263,5 @@ };

value = vars[key]
value = vars[key];
if ('string' !== typeof value) {
value = util.inspect(value)
value = util.inspect(value);
}

@@ -299,4 +303,9 @@

cgiData['process.pid'] = process.pid;
cgiData['process.uid'] = process.getuid();
cgiData['process.gid'] = process.getgid();
if(os.platform() != "win32") {
// this two properties are *NIX only
cgiData['process.uid'] = process.getuid();
cgiData['process.gid'] = process.getgid();
}
cgiData['process.cwd'] = process.cwd();

@@ -396,4 +405,4 @@ cgiData['process.execPath'] = process.execPath;

'deploy[scm_revision]': params.rev,
'deploy[scm_repository]': params.repo,
'deploy[scm_repository]': params.repo
});
};

@@ -15,7 +15,8 @@ {

"stefounet <s@fasterize.com> (http://fasterize.com)",
"sreuter <s.reuter@geek-it.de> (https://github.com/sreuterairbrake.io"
"sreuter <s.reuter@geek-it.de> (https://github.com/sreuterairbrake.io",
"Johnny Halife <johnny.halife@me.com> (http://johnny.io)"
],
"name": "airbrake",
"description": "Node.js client for airbrake.io",
"version": "0.3.1",
"version": "0.3.2",
"homepage": "https://github.com/felixge/node-airbrake",

@@ -22,0 +23,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc