fix(frontend): refactor api error handling

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-01-14 22:35:37 +01:00
parent e93144eb40
commit 57bfca7b15
44 changed files with 387 additions and 465 deletions

View file

@ -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>
`;

View file

@ -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>