Skip to content

Commit

Permalink
fix(ScannerModal): hide nasty API errors from user
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAndersen committed Jun 17, 2024
1 parent 64b75aa commit 33a9b43
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/matches/Scanner/ScannerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ const ScannerModal = ({
severity: feedback ? "info" : "success",
visible: true,
});
handleItemTransferred?.();
try {
handleItemTransferred?.();
} catch {
// Do not expose potentially rough API errors to user
}
} catch (error) {
setFeedback({
text: String(error),
Expand Down

0 comments on commit 33a9b43

Please sign in to comment.