aws-sdk-wrap
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -35,5 +35,3 @@ const get = require('lodash.get'); | ||
if (expectedErrorCodes.indexOf(e.code) !== -1) { | ||
return { | ||
[e.code]: e | ||
}; | ||
return e.code; | ||
} | ||
@@ -52,3 +50,4 @@ | ||
service, | ||
function: funcName | ||
function: funcName, | ||
error: e | ||
}); | ||
@@ -59,2 +58,2 @@ }); | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJnZXQiLCJyZXF1aXJlIiwiQVdTIiwiQXdzRXJyb3IiLCJFcnJvciIsImNvbnN0cnVjdG9yIiwibWVzc2FnZSIsImNvbnRleHQiLCJuYW1lIiwiY2FwdHVyZVN0YWNrVHJhY2UiLCJzZXJ2aWNlTG9va3VwIiwiT2JqZWN0Iiwia2V5cyIsInJlZHVjZSIsInByZXYiLCJjdXIiLCJhc3NpZ24iLCJ0b0xvd2VyQ2FzZSIsIm1vZHVsZSIsImV4cG9ydHMiLCJjb25maWciLCJsb2dnZXIiLCJzZXJ2aWNlcyIsImNhbGwiLCJzZXJ2aWNlIiwiZnVuY05hbWUiLCJwYXJhbXMiLCJleHBlY3RlZEVycm9yQ29kZXMiLCJ1bmRlZmluZWQiLCJwcm9taXNlIiwiY2F0Y2giLCJlIiwiaW5kZXhPZiIsImNvZGUiLCJlcnJvciIsImVycm9yTmFtZSIsImVycm9yRGV0YWlscyIsInJlcXVlc3RQYXJhbXMiLCJmdW5jdGlvbiJdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTUEsTUFBTUMsUUFBUSxZQUFSLENBQVo7O0FBQ0EsTUFBTUMsTUFBTUQsUUFBUSxTQUFSLENBQVo7O0FBRUEsTUFBTUUsUUFBTixTQUF1QkMsS0FBdkIsQ0FBNkI7QUFDM0JDLGNBQVlDLE9BQVosRUFBcUJDLE9BQXJCLEV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gICAgdGhyb3cgbmV3IEF3c0Vycm9yKGBFcnJvciBpbiAke3NlcnZpY2V9LiR7ZnVuY05hbWV9KClgLCB7IHNlcnZpY2UsIGZ1bmN0aW9uOiBmdW5jTmFtZSwgZXJyb3I6IGUgfSk7XG4gICAgICB9KTtcbiAgICB9XG4gIH07XG59O1xuIl19 |
{ | ||
"name": "aws-sdk-wrap", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Wrapper around aws-sdk", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -72,2 +72,2 @@ [![Build Status](https://img.shields.io/travis/simlu/aws-sdk-wrap/master.svg)](https://travis-ci.org/simlu/aws-sdk-wrap) | ||
Provide string list of expected AWS error codes. Promise succeeds on expected error with object of form `{ [errorCode]: error }`. | ||
Provide string list of expected AWS error codes. Promise succeeds on expected error with error code as string. |
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
11622
47