fix: enhance error handling in fetchPostDetail for server errors
This commit is contained in:
parent
b18cff8b1a
commit
118d994746
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ async function fetchPostDetail(apiBaseUrl: string, id: string) {
|
||||||
cache: "no-store",
|
cache: "no-store",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.status === 404) {
|
if (response.status === 404 || response.status >= 500) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue