1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-17 05:22:18 +00:00

Fix return HTTP 403 reason with or without verbose (#316)

This commit is contained in:
Adrian Calinescu
2021-01-26 14:52:23 +02:00
committed by GitHub
parent 1e8db6f9b9
commit 6d8f3c6ee0

View File

@@ -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);