We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f62681 commit c86bdb8Copy full SHA for c86bdb8
src/HttpClient.ts
@@ -37,6 +37,7 @@ interface FetchRequestOptions {
37
const MAX_RETRY_ATTEMPTS = 3;
38
const BACKOFF_MULTIPLIER = 1.5;
39
const MINIMUM_SLEEP_TIME = 500;
40
+const RETRY_STATUS_CODES = [500, 502, 504];
41
42
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
43
@@ -116,7 +117,7 @@ export default class ApiClient implements HttpClient {
116
117
return true;
118
}
119
- if (response?.status == 502) {
120
+ if (response != null && RETRY_STATUS_CODES.includes(response.status)) {
121
122
123
0 commit comments