Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Ignore more errors to be sent to Sentry (#2500)
Browse files Browse the repository at this point in the history
(all errors related to bad network, bad device conditions,.. are filtered out – so we can focus on actual LL errors)
  • Loading branch information
gre authored May 12, 2022
1 parent 6ac2a08 commit 801df3a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { getEnabled } from "./src/components/HookSentry";
import logReport from "./src/log-report";
import pkg from "./package.json";


// we exclude errors related to user's environment, not fixable by us
const excludedErrorName = [
// networking conditions
Expand All @@ -36,18 +37,24 @@ const excludedErrorName = [
"EthAppPleaseEnableContractData",
"CantOpenDevice",
"DisconnectedDeviceDuringOperation",
"DeviceOnDashboardExpected",
"PairingFailed",
"GetAppAndVersionUnsupportedFormat",
// other
"InvalidAddressError",
];
const excludedErrorDescription = [
// networking
/timeout of .* exceeded/,
"Network request failed",
"INVALID_STATE_ERR",
// base usage of device
/Device .* was disconnected/,
"Invalid channel",
// others
"Transaction signing request was rejected by the user",
"Transaction approval request was rejected",
];

if (Config.SENTRY_DSN && !__DEV__ && !Config.MOCK) {
Sentry.init({
dsn: Config.SENTRY_DSN,
Expand Down

0 comments on commit 801df3a

Please sign in to comment.