From c93c062395b0d66a4337650bc4f6b9d905c3f3fa Mon Sep 17 00:00:00 2001 From: lybell Date: Thu, 10 Oct 2024 09:41:40 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20http=20500=EB=8C=80=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EB=A5=BC=20=EC=84=9C=EB=B2=84=EA=B0=80=20=EB=8B=AB?= =?UTF-8?q?=ED=98=94=EC=9D=84=20=EB=95=8C=EB=A1=9C=20=EA=B0=84=EC=A3=BC?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/src/dataFetch/fetchServer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);