[CORL-353] show error if network request fails (#2731)

* show error if network request fails

* remove commented code

* Update src/core/client/admin/routes/AuthCheck/NetworkError.tsx

Co-Authored-By: Wyatt Johnson <wyattjoh@gmail.com>

* spell occurred correctly
This commit is contained in:
Tessa Thornton
2019-11-26 15:46:56 +00:00
committed by Wyatt Johnson
parent 9bc41ad020
commit 0e15bc46d2
6 changed files with 46 additions and 2 deletions
@@ -56,6 +56,11 @@ export default function createNetwork(
retryDelays: (attempt: number) => Math.pow(2, attempt + 4) * 100,
// or simple array [3200, 6400, 12800, 25600, 51200, 102400, 204800, 409600],
statusCodes: [500, 503, 504],
beforeRetry: ({ abort, attempt }) => {
if (attempt > 2) {
abort();
}
},
}),
authMiddleware({
token: tokenGetter,