Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix] http 500대 상태를 서버가 닫혔을 때로 간주하도록 수정 #152

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/common/src/dataFetch/fetchServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down