From dce5af6f5734fdfff4fe5b40a6880d0ff15c1651 Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Tue, 17 Jan 2023 04:50:07 +0000 Subject: [PATCH] Handle non-standard Cloudflare temporary errors --- src/util/errors.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/errors.ts b/src/util/errors.ts index a368fd8..1037e17 100644 --- a/src/util/errors.ts +++ b/src/util/errors.ts @@ -16,6 +16,13 @@ export const temporary_http_errors = [ 502, // Bad Gateway 503, // Service Unavailable 504, // Gateway Timeout + + // Non-standard Cloudflare status codes + 521, // Web Server Is Down + 522, // Connection Timed Out + 523, // Origin Is Unreachable + 524, // A Timeout Occurred + 530, // Unknown (1xxx error) ]; export async function handleError(