Skip to content

Commit

Permalink
Merge pull request #217 from Step3-kakao-tech-campus/feat/#171
Browse files Browse the repository at this point in the history
홈화면 500번 응답 처리 추가
  • Loading branch information
LimSumi authored Nov 11, 2023
2 parents 04fe4e6 + cd04d5d commit 160f6f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/home/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ const Home = () => {
headers: {
'Content-Type': 'application/json',
},
}).then((res) => res.json());
}).then((res) => {
if (res.status === 500) {
throw new Error('서버에 문제가 생겼어요...');
}
return res.json();
});
},
{
getNextPageParam: (lastPage) => {
Expand Down

0 comments on commit 160f6f2

Please sign in to comment.