Skip to content

Commit

Permalink
Fix return HTTP 403 reason with or without verbose (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
snobu authored Jan 26, 2021
1 parent 1e8db6f commit 6d8f3c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export class ApiClient {
return true;
}
logger.warn(`Got HTTP code ${err?.response?.status ?? undefined}. Retrying request...`);
logger.verbose('Here is the error message: \n' +
logger.warn('Here is the error message: \n' +
JSON.stringify(err.response?.data ?? undefined) +
'\nRetrying request...');
logger.verbose(`We called this URL: ${err.response?.config.baseURL}${err.response?.config.url}`);
logger.warn(`We called this URL: ${err.response?.config.baseURL}${err.response?.config.url}`);

const shouldRetry: boolean = retryCodes.includes(err?.response?.status ?? 0);

Expand Down

0 comments on commit 6d8f3c6

Please sign in to comment.