@supabase/postgrest-js 2.117.2 → 2.117.3-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -191,7 +191,8 @@ function shouldRetry(method, status, attemptCount, retryEnabled) {
191
191
  * `DEFAULT_MAX_RETRIES` times when the fetch rejects or the server answers
192
192
  * with a retryable status (503, 520). The wait honours the `Retry-After`
193
193
  * header when present and backs off exponentially otherwise. Retried
194
- * attempts carry an `X-Retry-Count` header. Aborted requests and
194
+ * attempts carry an `X-Retry-Count` header. Aborted requests (including
195
+ * `AbortSignal.timeout()`, which rejects with `TimeoutError`) and
195
196
  * non-idempotent methods are never retried: their rejection propagates
196
197
  * unchanged. A response body is drained before its request is retried.
197
198
  */
@@ -209,7 +210,8 @@ async function fetchWithRetry(fetchImpl, url, request, retryEnabled) {
209
210
  signal: request.signal
210
211
  });
211
212
  } catch (fetchError) {
212
- if ((fetchError === null || fetchError === void 0 ? void 0 : fetchError.name) === "AbortError" || (fetchError === null || fetchError === void 0 ? void 0 : fetchError.code) === "ABORT_ERR") throw fetchError;
213
+ var _request$signal;
214
+ if ((fetchError === null || fetchError === void 0 ? void 0 : fetchError.name) === "AbortError" || (fetchError === null || fetchError === void 0 ? void 0 : fetchError.code) === "ABORT_ERR" || (fetchError === null || fetchError === void 0 ? void 0 : fetchError.name) === "TimeoutError" && ((_request$signal = request.signal) === null || _request$signal === void 0 ? void 0 : _request$signal.aborted)) throw fetchError;
213
215
  if (!RETRYABLE_METHODS.includes(request.method)) throw fetchError;
214
216
  if (retryEnabled && attemptCount < DEFAULT_MAX_RETRIES) {
215
217
  const delay = getRetryDelay(attemptCount);