You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Signup with email and password (or login if you already have an account)
Disable all network interfaces
Wait 2 minutes until token expires and auto refresh is triggered
The refresh request fails due to the client being offline. The client does not backoff and retry with further requests.
Expected behavior
The client should backoff and retry to refresh the token.
Suggested fix
This regression seems to have been introduced in 1.23.0-next in lib/fetch.ts with #301.
Introduce a new Error AuthNetworkFailureError exends AuthError
Throw AuthNetworkFailureError instead of AuthUnknownError. Fetch only throws on a network error (unfortunately there seems to be no way to distinguish between network errors and CORS though).
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Describe the bug
Backoff during auto refresh upon network failure fails in 1.23.0-next.
To Reproduce
The refresh request fails due to the client being offline. The client does not backoff and retry with further requests.
Expected behavior
The client should backoff and retry to refresh the token.
Suggested fix
This regression seems to have been introduced in 1.23.0-next in
lib/fetch.ts
with #301.AuthNetworkFailureError exends AuthError
AuthNetworkFailureError
instead ofAuthUnknownError
. Fetch only throws on a network error (unfortunately there seems to be no way to distinguish between network errors and CORS though).error?.message === NETWORK_FAILURE.ERROR_MESSAGE
witherror instanceof AuthNetworkFailureError
NETWORK_FAILURE.ERROR_MESSAGE
System information
Additional context
The same mal function can probably be observed in
_recoverAndRefresh
.The text was updated successfully, but these errors were encountered: