Socket
Socket
Sign inDemoInstall

sentry-node

Package Overview
Dependencies
9
Maintainers
6
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.2 to 2.2.0

27

lib-js/sentry.js

@@ -86,3 +86,3 @@ // Generated by CoffeeScript 1.6.3

Sentry.prototype.error = function(err, logger, culprit, extra) {
Sentry.prototype.error = function(err, logger, culprit, extra, cb) {
var data;

@@ -111,6 +111,6 @@ if (extra == null) {

}
return this._send(data);
return this._send(data, cb);
};
Sentry.prototype.message = function(message, logger, extra) {
Sentry.prototype.message = function(message, logger, extra, cb) {
var data;

@@ -126,10 +126,15 @@ if (extra == null) {

};
return this._send(data);
return this._send(data, cb);
};
Sentry.prototype._send = function(data) {
Sentry.prototype._send = function(data, cb) {
var options,
_this = this;
if (cb == null) {
cb = function() {};
}
if (!this.enabled) {
return console.log(this.disable_message);
this.emit("done");
console.log(this.disable_message);
return setImmediate(cb);
}

@@ -160,10 +165,14 @@ if ((data.logger != null) && !_.isString(data.logger)) {

var _ref;
_this.emit("done");
if ((err != null) || res.statusCode > 299) {
if ((_ref = res.statusCode) === 429 || _ref === 413) {
return _handle_http_load_errors(_this, err);
_handle_http_load_errors(_this, err);
return cb(err || new Error("status code: " + res.statusCode));
}
console.error('Error posting event to Sentry:', err, body);
return _this.emit("error", err);
_this.emit("error", err);
return cb(err || new Error("status code: " + res.statusCode));
} else {
return _this.emit("logged");
_this.emit("logged");
return cb();
}

@@ -170,0 +179,0 @@ });

{
"name": "sentry-node",
"version": "2.1.2",
"version": "2.2.0",
"description": "simple Node wrapper around Sentry API",

@@ -5,0 +5,0 @@ "engines": {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc