From f8bc4877effb274db33f1451791dab6da9e94cbf Mon Sep 17 00:00:00 2001 From: Yanlong Wang Date: Thu, 12 Sep 2024 19:50:46 +0800 Subject: [PATCH] fix --- backend/functions/src/services/snapshot-formatter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/functions/src/services/snapshot-formatter.ts b/backend/functions/src/services/snapshot-formatter.ts index 949bfc0..fc58b56 100644 --- a/backend/functions/src/services/snapshot-formatter.ts +++ b/backend/functions/src/services/snapshot-formatter.ts @@ -328,7 +328,7 @@ export class SnapshotFormatter extends AsyncService { if (snapshot.status) { const code = snapshot.status; const n = code - 200; - if (n < 100 || n >= 100) { + if (n < 0 || n >= 100) { const text = snapshot.statusText || STATUS_CODES[code]; formatted.warning = `Target URL returned error ${code}${text? `: ${text}` : ''}`; } @@ -436,7 +436,7 @@ ${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`; if (snapshot.status) { const code = snapshot.status; const n = code - 200; - if (n < 100 || n >= 100) { + if (n < 0 || n >= 100) { const text = snapshot.statusText || STATUS_CODES[code]; mixin.warning = `Target URL returned error ${code}${text ? `: ${text}` : ''}`; }