Skip to content

Commit

Permalink
fixup! fixup! fix: 'Backend is not available...' error message
Browse files Browse the repository at this point in the history
  • Loading branch information
olexii4 committed Oct 4, 2023
1 parent c9c6bd6 commit 74206bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/dashboard-frontend/src/store/SanityCheck/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,16 @@ export const actionCreators: ActionCreators = {

break;
} catch (e) {
if (isUnauthorized(e) || (isForbidden(e) && hasLoginPage(e))) {
await delay(1000);
window.location.reload();
}
if (attempt === maxAttemptsNumber) {
throw e;
}
await delay(1000);
}
}
} catch (e) {
if (isUnauthorized(e) || (isForbidden(e) && hasLoginPage(e))) {
window.location.reload();
}
const errorMessage = getErrorMessage(e);
dispatch({
type: Type.RECEIVED_BACKEND_CHECK_ERROR,
Expand Down

0 comments on commit 74206bf

Please sign in to comment.