diff --git a/packages/http-probe-performer/src/index.ts b/packages/http-probe-performer/src/index.ts index 097b1b4..3137760 100644 --- a/packages/http-probe-performer/src/index.ts +++ b/packages/http-probe-performer/src/index.ts @@ -55,9 +55,8 @@ export class HttpProbePerformer extends ProbePerformer { credentials: 'same-origin', }); - if (response.status < 200 || response.status >= 400) { - throw new Error(`HTTP status code: ${response.status}`); - } + if (response.status >= 200 && response.status < 400) return; + throw new Error(`HTTP status code: ${response.status}`); }); } }