diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e07b503 --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.travis.yml +.vscode/ +.nyc_output/ +test/ +example/ +coverage/ diff --git a/index.js b/index.js index 9ec7448..ac30787 100644 --- a/index.js +++ b/index.js @@ -48,6 +48,10 @@ function extendError(AWS, opts) { const origSend = AWS.Request.prototype.send; AWS.Request.prototype.send = function sendEx(callback) { + if (!callback) { + return origSend.call(this) + } + const req = this; let runStack = null; if (needRunAt) runStack = getRunStack(arguments.callee).slice(2); diff --git a/package.json b/package.json index 7ecd090..45cd090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "extend-aws-error", - "version": "0.5.0", + "version": "0.6.0", "description": "Extend AWS SDK request error with the request information", "main": "extend_aws_error.js", "scripts": {