Skip to content

Commit

Permalink
fix: notification on error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriocomo committed Jan 8, 2025
1 parent 3adbbdc commit e63801b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export default function Editor() {


} catch (error: unknown) {
notify('import error', (error as Error).message, {
notify('Import error', (error as Error).message, {
dismissable: true,
state: "error",
})
Expand All @@ -306,8 +306,11 @@ export default function Editor() {

await setFormDataAfterImport(fetchDataFn);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (_) {
} catch (error) {
//invalid url
notify(t('editor.notvalidurl'), t('editor.notvalidurl'), {
state: 'error'
})
}

};
Expand Down
Loading

0 comments on commit e63801b

Please sign in to comment.