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

airbrake

Package Overview
Dependencies
Maintainers
1
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.2.1 to 0.2.2

test/fast/.test-no-key.js.un~

28

lib/airbrake.js

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

var stackTrace = require('stack-trace');
var traverse = require('traverse');
var hashish = require('hashish');

@@ -36,6 +35,2 @@ var querystring = require('querystring');

Airbrake.createClient = function(key, env) {
if (!key || typeof key !== 'string' || key.length !== 32) {
throw new Error('You must supply a valid Airbreak API key.');
}
var instance = new this();

@@ -93,4 +88,10 @@ instance.key = key;

var status = HTTP_STATUS_CODES[res.statusCode];
var explanation = body.match(/<error>([^<]+)/i);
explanation = (explanation)
? ': ' + explanation[1]
: '';
return callback(new Error(
'Notification failed: ' + res.statusCode + ' ' + status
'Notification failed: ' + res.statusCode + ' ' + status + explanation
));

@@ -145,3 +146,3 @@ }

.ele('api-key')
.txt(this.key)
.txt(this.key || '-')
.up()

@@ -213,18 +214,7 @@ .ele('notifier')

Object.keys(vars).forEach(function(key) {
// JSON.stringify throws on circular structures, lets remove those
var val = traverse(vars[key]).map(function(node) {
if (this.circular) {
this.update('[Circular]');
}
});
val = JSON.stringify(val);
node = node || request.ele(type);
node
.ele('var')
.att('key', key)
.txt(val);
.txt(util.inspect(vars[key]));
});

@@ -231,0 +221,0 @@ };

@@ -5,3 +5,3 @@ {

"description": "Node.js client for airbrakeapp.com, formerly known as hoptoadapp.com.",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/felixge/node-airbrake",

@@ -20,3 +20,2 @@ "repository": {

"stack-trace": "0.0.5",
"traverse": "0.4.4",
"hashish": "0.0.4"

@@ -23,0 +22,0 @@ },

@@ -162,7 +162,7 @@ # airbrake

### airbrake.url = 'http://' + os.hostname()
### airbrake.host = 'http://' + os.hostname()
The base url for errors. If `err.url` is not set, `airbrake.url` is used
The base url for errors. If `err.url` is not set, `airbrake.host` is used
instead. If `err.url` is a relative url starting with `'/'`, it is appended
to `airbrake.url`. If `err.url` is an absolute url, `airbrake.url` is ignored.
to `airbrake.host`. If `err.url` is an absolute url, `airbrake.host` is ignored.

@@ -169,0 +169,0 @@ ### airbrake.projectRoot = null

var common = require('../common');
var airbrake = require(common.dir.root).createClient()
var airbrake = require(common.dir.root).createClient();
var assert = require('assert');

@@ -4,0 +4,0 @@ var sinon = require('sinon');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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