diff --git a/package-lock.json b/package-lock.json index e67fad1..1ddc7f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -564,9 +564,9 @@ "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" }, "@razee/kubernetes-util": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@razee/kubernetes-util/-/kubernetes-util-0.1.5.tgz", - "integrity": "sha512-G8QEHtOl66QctaD+ufwkPtCaAcy/pqqo4ZGTQBUugzg68q0RH7UtjpjQbUBekMB/Yu0FcY1jK9ojfWtQIuwNzw==", + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@razee/kubernetes-util/-/kubernetes-util-0.1.6.tgz", + "integrity": "sha512-j7IsENxpkktp/oZo+Szc8nEEElG8YjJtPGBhNriBAcCW9GG/KOPKQYL1WIRrSL89xViTkbKoAort8Tf/fSZWDg==", "requires": { "@kubernetes/client-node": "^0.12.0", "JSONStream": "^1.3.5", diff --git a/package.json b/package.json index d01cd47..9a249f4 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "license": "Apache-2.0", "dependencies": { "@kubernetes/client-node": "^0.12.2", - "@razee/kubernetes-util": "^0.1.5", + "@razee/kubernetes-util": "^0.1.6", "JSONStream": "^1.3.5", "agentkeepalive": "^4.1.3", "bunyan": "^1.8.14", diff --git a/src/index.js b/src/index.js index 821fbf1..fcfcdb5 100644 --- a/src/index.js +++ b/src/index.js @@ -89,6 +89,11 @@ async function init() { main(); return true; } + +process.on('unhandledRejection', (reason) => { + log.error(reason, 'Unhandled promise rejection.'); +}); + promiseRetry({ retries: 5 }, retry => { return init().catch(retry);