vexana icon indicating copy to clipboard operation
vexana copied to clipboard

Incorrect Error Handling After Successful Token Refresh

Open ahmtydn opened this issue 1 year ago • 0 comments

[!NOTE]
After a successful token refresh, an error occurs during the retry of the original request. Instead of handling the new error, the initial authentication error (401 Unauthorized) is mistakenly thrown again.

[!TIP] This incorrect error handling prevents the app from responding properly to different errors after the refresh token process.

Steps to Reproduce:

  1. Trigger a token refresh process.
  2. During the retry of the request with the new token, cause a different error (e.g., server error).
  3. Observe that the original 401 Unauthorized error is thrown instead of the new error.

[!WARNING]
This issue affects error handling across the application and can lead to confusion during the retry process, as unrelated errors are not being captured correctly.

Expected Behavior:

[!IMPORTANT]
The new error should be caught and handled correctly after the token refresh process.

Proposed Solution:

[!CAUTION] Ensure that any new errors encountered after a token refresh are handled properly, without reusing the initial error.

ahmtydn avatar Sep 28 '24 16:09 ahmtydn