nomagick commited on
Commit
39e49ca
·
unverified ·
1 Parent(s): 96ce7f5

fix: 3xx not considered errors

Browse files
backend/functions/src/services/snapshot-formatter.ts CHANGED
@@ -328,7 +328,7 @@ export class SnapshotFormatter extends AsyncService {
328
  if (snapshot.status) {
329
  const code = snapshot.status;
330
  const n = code - 200;
331
- if (n < 0 || n >= 100) {
332
  const text = snapshot.statusText || STATUS_CODES[code];
333
  formatted.warning = `Target URL returned error ${code}${text? `: ${text}` : ''}`;
334
  }
@@ -436,7 +436,7 @@ ${suffixMixins.length ? `\n${suffixMixins.join('\n\n')}\n` : ''}`;
436
  if (snapshot.status) {
437
  const code = snapshot.status;
438
  const n = code - 200;
439
- if (n < 0 || n >= 100) {
440
  const text = snapshot.statusText || STATUS_CODES[code];
441
  mixin.warning = `Target URL returned error ${code}${text ? `: ${text}` : ''}`;
442
  }
 
328
  if (snapshot.status) {
329
  const code = snapshot.status;
330
  const n = code - 200;
331
+ if (n < 0 || n >= 200) {
332
  const text = snapshot.statusText || STATUS_CODES[code];
333
  formatted.warning = `Target URL returned error ${code}${text? `: ${text}` : ''}`;
334
  }
 
436
  if (snapshot.status) {
437
  const code = snapshot.status;
438
  const n = code - 200;
439
+ if (n < 0 || n >= 200) {
440
  const text = snapshot.statusText || STATUS_CODES[code];
441
  mixin.warning = `Target URL returned error ${code}${text ? `: ${text}` : ''}`;
442
  }