mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-12 22:26:08 -04:00
fix(frontend): refactor api error handling
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
e93144eb40
commit
57bfca7b15
44 changed files with 387 additions and 465 deletions
|
@ -27,9 +27,6 @@ exports[`Note loading boundary shows an error 1`] = `
|
|||
</span>
|
||||
<span>
|
||||
children:
|
||||
<span>
|
||||
This is a mock for CreateNonExistingNoteHint
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
@ -32,7 +32,7 @@ export const NoteLoadingBoundary: React.FC<PropsWithChildren> = ({ children }) =
|
|||
}
|
||||
return (
|
||||
<CommonErrorPage titleI18nKey={`${error.message}.title`} descriptionI18nKey={`${error.message}.description`}>
|
||||
<ShowIf condition={error.message === 'api.note.notFound'}>
|
||||
<ShowIf condition={error.message === 'api.error.note.not_found'}>
|
||||
<CreateNonExistingNoteHint onNoteCreated={loadNoteFromServer} />
|
||||
</ShowIf>
|
||||
</CommonErrorPage>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue