diff --git a/packages/lib/errors.ts b/packages/lib/errors.ts index 9c7cf675be..191c871731 100644 --- a/packages/lib/errors.ts +++ b/packages/lib/errors.ts @@ -21,7 +21,7 @@ export async function handleErrorsJson(response: Response): Promise return new Promise((resolve) => resolve({} as Type)); } - if (!response.ok && response.status < 200 && response.status >= 300) { + if (!response.ok && (response.status < 200 || response.status >= 300)) { response.json().then(console.log); throw Error(response.statusText); }