diff --git a/lib/fetcher.ts b/lib/fetcher.ts index 050e126..a6be117 100644 --- a/lib/fetcher.ts +++ b/lib/fetcher.ts @@ -7,7 +7,7 @@ export default function fetcher(url: string, data = undefined) { }, body: JSON.stringify(data), }).then((res) => { - if (res.status > 399 && res.status < 200) { + if (res.status > 399 || res.status < 200) { throw new Error() } return res.json()