sentry-node
Advanced tools
Comparing version 1.0.5 to 2.0.0
// Generated by CoffeeScript 1.6.3 | ||
var Sentry, events, nodeurl, os, parseDSN, quest, util, _, | ||
var Sentry, events, nodeurl, os, parseDSN, quest, util, _, _handle_http_429, | ||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
@@ -36,2 +36,6 @@ __hasProp = {}.hasOwnProperty, | ||
_handle_http_429 = function(context, err) { | ||
return context.emit("warning", err); | ||
}; | ||
module.exports = Sentry = (function(_super) { | ||
@@ -70,3 +74,3 @@ __extends(Sentry, _super); | ||
err = new Error("WARNING: err not passed as Error! " + (JSON.stringify(err, null, 2))); | ||
this.emit('warning', new Error(err)); | ||
this.emit('warning', err); | ||
} | ||
@@ -135,2 +139,5 @@ data = { | ||
if ((err != null) || res.statusCode > 299) { | ||
if (res.statusCode === 429) { | ||
return _handle_http_429(_this, err); | ||
} | ||
console.error('Error posting event to Sentry:', err, body); | ||
@@ -147,1 +154,7 @@ return _this.emit("error", err); | ||
})(events.EventEmitter); | ||
if (process.env.NODE_ENV === 'test') { | ||
module.exports._private = { | ||
_handle_http_429: _handle_http_429 | ||
}; | ||
} |
{ | ||
"name": "sentry-node", | ||
"version": "1.0.5", | ||
"version": "2.0.0", | ||
"description": "simple Node wrapper around Sentry API", | ||
@@ -35,6 +35,7 @@ "engines": { | ||
"devDependencies": { | ||
"coffee-script": "~1.6.3", | ||
"mocha": "~1.14.0", | ||
"coffee-script": "~1.6.3", | ||
"nock": "~0.23.0" | ||
"nock": "~0.23.0", | ||
"sinon": "^1.10.3" | ||
} | ||
} |
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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
33797
141
4
3