Comparing version 0.3.11 to 0.3.12
# 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)) |
@@ -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}); |
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
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
95977
33
1282