Socket
Socket
Sign inDemoInstall

rollbar

Package Overview
Dependencies
Maintainers
3
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollbar - npm Package Compare versions

Comparing version 0.3.11 to 0.3.12

.idea/.name

3

CHANGELOG.md
# Change Log
**0.3.12**
- Fix param scrubbing failing when the value is null/undefined ([#30](https://github.com/rollbar/node_rollbar/pull/30))
**0.3.11**

@@ -4,0 +7,0 @@ - Add `handleErrorWithPayloadData` function, exposing more of the Rollbar API when reporting errors. ([#29](https://github.com/rollbar/node_rollbar/pull/29))

2

lib/notifier.js

@@ -313,3 +313,3 @@ var http = require('http');

for (var k in params) {
if (settings.scrubFields.indexOf(k) >= 0) {
if (params[k] && settings.scrubFields.indexOf(k) >= 0) {
params[k] = Array(params[k].length + 1).join('*');

@@ -316,0 +316,0 @@ }

@@ -13,3 +13,3 @@ {

],
"version": "0.3.11",
"version": "0.3.12",
"repository": "git://github.com/rollbar/node_rollbar.git",

@@ -16,0 +16,0 @@ "author": "Rollbar, Inc. <support@rollbar.com>",

@@ -123,8 +123,8 @@ # Rollbar notifier for Node.js [![Build Status](https://secure.travis-ci.org/rollbar/node_rollbar.png?branch=master)](https://travis-ci.org/rollbar/node_rollbar)

// to specify payload options - like extra data, or the level - use handleErrorWithPayloadData
rollbar.handleError(e, {level: "warning", custom: {someKey: "arbitrary value"}});
rollbar.handleErrorWithPayloadData(e, {level: "warning", custom: {someKey: "arbitrary value"}});
// can also take request and callback, like handleError:
rollbar.handleError(e, {level: "info"}, request);
rollbar.handleError(e, {level: "info"}, callback);
rollbar.handleError(e, {level: "info"}, request, callback);
rollbar.handleErrorWithPayloadData(e, {level: "info"}, request);
rollbar.handleErrorWithPayloadData(e, {level: "info"}, callback);
rollbar.handleErrorWithPayloadData(e, {level: "info"}, request, callback);
}

@@ -131,0 +131,0 @@ ```

@@ -134,3 +134,20 @@ var assert = require('assert');

}
},
'scrubRequestParams ignores null or undefined values': {
topic: function() {
var callback = this.callback;
return callback(null,
notifier._scrubRequestParams(['nullValue', 'undefinedValue', 'emptyValue'],
{nullValue: null,
undefinedValue: undefined,
emptyValue: '',
goodValue: 'goodValue'}));
},
'verify fields are scrubbed': function(err, params) {
assert.equal(params.nullValue, null);
assert.equal(params.undefinedValue, undefined);
assert.equal(params.emptyValue, '');
assert.equal(params.goodValue, 'goodValue');
}
}
}).export(module, {error: 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