diff --git a/packages/common/src/dataFetch/fetchServer.js b/packages/common/src/dataFetch/fetchServer.js index 2e958f85..a621cb4b 100644 --- a/packages/common/src/dataFetch/fetchServer.js +++ b/packages/common/src/dataFetch/fetchServer.js @@ -48,7 +48,8 @@ function createFetchOptions(options = {}) { async function fetchServerBase(url, options = {}) { try { const response = await fetch(url, createFetchOptions(options)); - if (response.status >= 400 && response.status <= 599) throw new HTTPError(response); + if (response.status >= 400 && response.status <= 499) throw new HTTPError(response); + if (response.status >= 500) throw new ServerCloseError(); const text = await response.text(); if (text === "") return null; return JSON.parse(text);