Skip to content

Commit b2c073f

Browse files
committed
fixup! fixup! ♿️(frontend) redirect unmanaged 5xx to dedicated /500 page
1 parent 659aa27 commit b2c073f

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/frontend/apps/impress/src/features/docs/doc-versioning/components/DocVersionEditor.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export const DocVersionEditor = ({
5555

5656
if (error.status === 404) {
5757
void replace('/404');
58+
} else if (error.status === 502) {
59+
void replace('/offline');
5860
} else {
5961
const fromPath = encodeURIComponent(asPath);
6062
void replace(`/500?from=${fromPath}`);

src/frontend/apps/impress/src/pages/docs/[id]/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ const DocPage = ({ id }: DocProps) => {
209209
return;
210210
}
211211

212+
if (error.status === 502) {
213+
void replace('/offline');
214+
return;
215+
}
216+
212217
const fromPath = encodeURIComponent(asPath);
213218
void replace(`/500?from=${fromPath}`);
214219
}, [isError, error?.status, replace, authenticated, queryClient, asPath]);

0 commit comments

Comments
 (0)