Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

fix(ScannerModal): hide nasty API errors from user #438

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/matches/Scanner/ScannerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ const ScannerModal = ({
severity: feedback ? "info" : "success",
visible: true,
});
handleItemTransferred?.();
try {
handleItemTransferred?.();
} catch (error: unknown) {
// Do not expose potentially rough API errors to user
console.error("Got error when handling item transferred", error);
}
} catch (error) {
setFeedback({
text: String(error),
Expand Down