diff --git a/package.json b/package.json index f835298..8a97abb 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "lodash.clonedeep": "^4.5.0", "lodash.merge": "^4.6.0", "lowdb": "^0.16.2", - "node-fetch": "^1.7.1", + "node-fetch": "2.0.0", "pg": "^7.4.0", "prompt": "^1.0.0", "s3": "^4.4.0", diff --git a/src/webhook.js b/src/webhook.js index 9f3ef25..c7cdf6b 100644 --- a/src/webhook.js +++ b/src/webhook.js @@ -38,7 +38,7 @@ function ping (job, options) { var headers = new fetch.Headers() for(var i in headerOptions) { - headers.set(i, headerOptions[i]) + try { headers.set(i, headerOptions[i]) } catch (_e) {}; } requestOptions.headers = headers