diff --git a/lib/build/axios.js b/lib/build/axios.js index f0c7274..98e6b27 100644 --- a/lib/build/axios.js +++ b/lib/build/axios.js @@ -338,6 +338,9 @@ AuthHttpRequest.doRequest = (httpCall, config, url, prevResponse, prevError, via } let response = localPrevResponse === undefined ? yield httpCall(configWithAntiCsrf) : localPrevResponse; + // NOTE: No need to check for unauthorized response status here for session refresh, + // as we only reach this point on a successful response. Axios handles error responses + // by throwing an error, which is handled in the catch block. logDebugMessage("doRequest: User's http call ended"); yield saveTokensFromHeaders(response); fireSessionUpdateEventsIfNecessary( diff --git a/lib/ts/axios.ts b/lib/ts/axios.ts index 4b5d780..b943b69 100644 --- a/lib/ts/axios.ts +++ b/lib/ts/axios.ts @@ -383,6 +383,11 @@ export default class AuthHttpRequest { } let response = localPrevResponse === undefined ? await httpCall(configWithAntiCsrf) : localPrevResponse; + + // NOTE: No need to check for unauthorized response status here for session refresh, + // as we only reach this point on a successful response. Axios handles error responses + // by throwing an error, which is handled in the catch block. + logDebugMessage("doRequest: User's http call ended"); await saveTokensFromHeaders(response);