Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Error Handling After Successful Token Refresh #118

Open
ahmtydn opened this issue Sep 28, 2024 · 0 comments · May be fixed by #119
Open

Incorrect Error Handling After Successful Token Refresh #118

ahmtydn opened this issue Sep 28, 2024 · 0 comments · May be fixed by #119

Comments

@ahmtydn
Copy link

ahmtydn commented Sep 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant