Skip to content

Commit

Permalink
Add message from backend for addscope failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoi-eq committed Jan 16, 2025
1 parent 62422b3 commit 8340e6d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/modules/Preservation/views/AddScope/AddScope.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,14 @@ const AddScope = (): JSX.Element => {
error.message,
error.data
);
showSnackbarNotification(error.message, 5000);
showSnackbarNotification(
error.data != null &&
error.data.data != null &&
error.data.data.length > 0
? error.data.data[0]
: error.message,
10000
);
}
setIsSubmittingScope(false);
return Promise.resolve();
Expand Down

0 comments on commit 8340e6d

Please sign in to comment.