diff --git a/lib/error/index.js b/lib/error/index.js index 3d65191..5c1776d 100644 --- a/lib/error/index.js +++ b/lib/error/index.js @@ -2,7 +2,6 @@ const Promise = require('promiscuous'); const Config = require('../configuration'); -const _ = require('lodash'); let tags = []; @@ -32,8 +31,7 @@ function report(error, additionalTags, extra) { // Need this wrapping so that our internal implementation can safely throw errors return new Promise(function(resolve) { console.log(error.nativeError ? error.nativeError : error); //eslint-disable-line no-console - error.extra = _.merge(extra || {}, error.extra); - console.log(error.extra); //eslint-disable-line no-console + console.log(extra); //eslint-disable-line no-console resolve(error); }); }).catch(function(err) { diff --git a/package.json b/package.json index 93f7fa8..db8b451 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lambda-foundation", - "version": "3.0.4", + "version": "3.0.6", "description": "Common helpers for Lambda backed microservices", "main": "index.js", "scripts": { diff --git a/test/error-test.js b/test/error-test.js index 222ea15..ab87dac 100644 --- a/test/error-test.js +++ b/test/error-test.js @@ -2,7 +2,6 @@ const tape = require('tape'); const LambdaError = require('../lib/error'); -const _ = require('lodash'); // Add a TEST tag to our errors LambdaError.config({ @@ -31,7 +30,7 @@ tape.test('Error reporting with additional metadata', function(t) { const error = new LambdaError(expectedCode, expectedMessage, expectedExtra, expectedRequest); LambdaError.report(error, undefined, expectedAdditionalExtra).then(function(err) { - t.same(err.extra, _.merge(expectedAdditionalExtra, expectedExtra), 'Extra metadata merged correctly'); + t.same(err.extra, expectedExtra, 'Extra metadata set correctly'); t.same(err.request, expectedRequest, 'Request data preserved'); t.end(); });