_refetchUserOnUnauthorized
Overview
Refetches the current user when error is an UnauthorizedError, so authPendingFlow names the flow that the server now requires. A request guarded by an auth flow, such as a pending sign-in or recent authentication, answers 401 when that flow has changed. The refetch keeps the existing error and ignores its own failure. Other errors are ignored.
Signature
_refetchUserOnUnauthorized(error)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| error | Error | yes | The error from a failed request. |
Returns
Promise
The refetch promise for an UnauthorizedError, otherwise undefined.
Source
client/lib/stores/storeUser.js:494