diff --git a/package-lock.json b/package-lock.json index 20d3100..62d708f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "mwn", "version": "1.11.4", "license": "LGPL-3.0-or-later", "dependencies": { diff --git a/src/core.ts b/src/core.ts index 0e0f454..ecfbb47 100644 --- a/src/core.ts +++ b/src/core.ts @@ -372,6 +372,10 @@ export class Response { return rejectWithError(errorData); } + /** + * This handles errors at the network level + * @param {Object} error + */ handleRequestFailure(error: any) { if ( !error.disableRetry && @@ -381,6 +385,7 @@ export class Response { ) { // error might be transient, give it another go! log(`[W] Encountered ${error}, retrying in ${this.bot.options.retryPause / 1000} seconds`); + console.log(error); // log the full error for upstream reporting if required return sleep(this.bot.options.retryPause).then(() => { return this.retry(); });