Skip to content

Commit

Permalink
Wider error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lindlof committed Dec 13, 2020
1 parent a63012c commit 466756a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const playHandsign = async (
} catch (e) {
setGame((g: Game.Game) => ({ ...g, lastHandsign: undefined }));
if (e instanceof Error) {
console.log('playHandsign error:', e.message);
if (e.message === 'Request rejected') {
enqueueSnackbar('Transaction rejected', { variant: 'error' });
throw e;
Expand All @@ -168,7 +169,6 @@ const playHandsign = async (
throw e;
}
}
console.log('playHandsign error:', e.message);
enqueueSnackbar('Error playing handsign', { variant: 'error' });
throw e;
}
Expand All @@ -185,6 +185,7 @@ const claimInactivity = async (
setGame(undefined);
} catch (e) {
if (e instanceof Error) {
console.log('claimInactivity error:', e.message);
if (e.message === 'Request rejected') {
enqueueSnackbar('Transaction rejected', { variant: 'error' });
throw e;
Expand All @@ -194,7 +195,6 @@ const claimInactivity = async (
throw e;
}
}
console.log('claimInactivity error:', e.message);
enqueueSnackbar('Error ending game', { variant: 'error' });
throw e;
}
Expand Down

0 comments on commit 466756a

Please sign in to comment.