New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

error-cat

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-cat - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

6

index.js

@@ -151,3 +151,7 @@ 'use strict';

// https://github.com/rollbar/node_rollbar/blob/a03b3a6e6e0a2734e2657cbf41e21927003f505d/lib/notifier.js#L359
rollbar.handleErrorWithPayloadData(err, { custom: (err.data || {}) }, req, cb);
var payload = {
level: err.level || 'error',
custom: err.data || {}
};
rollbar.handleErrorWithPayloadData(err, payload, req, cb);
};

@@ -154,0 +158,0 @@

2

package.json
{
"name": "error-cat",
"version": "1.4.1",
"version": "1.4.2",
"description": "A friendly feline companion that helps you create, track, and report errors.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -443,3 +443,3 @@ 'use strict';

error.report(err);
var expected = { custom: err.data };
var expected = { level: 'error', custom: err.data };
expect(rollbar.handleErrorWithPayloadData.firstCall.args[1])

@@ -453,6 +453,23 @@ .to.deep.equal(expected);

expect(rollbar.handleErrorWithPayloadData.firstCall.args[1])
.to.deep.equal({ custom: {} });
.to.deep.equal({ level: 'error', custom: {} });
done();
});
it('should set level if provided', function(done) {
var testError = new Error('Some message');
testError.level = 'warning';
error.report(testError);
expect(rollbar.handleErrorWithPayloadData.firstCall.args[1])
.to.deep.equal({ level: 'warning', custom: {} });
done();
});
it('should use `error` as default level', function(done) {
var testError = new Error('Some message');
error.report(testError);
expect(rollbar.handleErrorWithPayloadData.firstCall.args[1])
.to.deep.equal({ level: 'error', custom: {} });
done();
});
it('should do nothing when rollbar is unavailable', function(done) {

@@ -459,0 +476,0 @@ error.canUseRollbar.returns(false);

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