Update proxy.js
Browse files
proxy.js
CHANGED
|
@@ -38,6 +38,11 @@ async function retryWith503Backoff(url, options, startTime) {
|
|
| 38 |
return response;
|
| 39 |
}
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
// For 503: retry with exponential backoff until max time
|
| 42 |
// For other errors: retry up to 3 times, then return the error
|
| 43 |
if (response.status === 503) {
|
|
|
|
| 38 |
return response;
|
| 39 |
}
|
| 40 |
|
| 41 |
+
// Don't retry 401 (Unauthorized) - return immediately
|
| 42 |
+
if (response.status === 401) {
|
| 43 |
+
return response;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
// For 503: retry with exponential backoff until max time
|
| 47 |
// For other errors: retry up to 3 times, then return the error
|
| 48 |
if (response.status === 503) {
|