mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Log persistence errors with Sentry (#10018)
Failures to persist state are now logged in Sentry. Previously they were only logged to the background console.
This commit is contained in:
parent
ba2c56c871
commit
e9b5386f74
@ -19,6 +19,7 @@ import extension from 'extensionizer'
|
|||||||
import storeTransform from 'obs-store/lib/transform'
|
import storeTransform from 'obs-store/lib/transform'
|
||||||
import asStream from 'obs-store/lib/asStream'
|
import asStream from 'obs-store/lib/asStream'
|
||||||
import PortStream from 'extension-port-stream'
|
import PortStream from 'extension-port-stream'
|
||||||
|
import { captureException } from '@sentry/browser'
|
||||||
import migrations from './migrations'
|
import migrations from './migrations'
|
||||||
import Migrator from './lib/migrator'
|
import Migrator from './lib/migrator'
|
||||||
import ExtensionPlatform from './platforms/extension'
|
import ExtensionPlatform from './platforms/extension'
|
||||||
@ -279,6 +280,7 @@ function setupController(initState, initLangCode) {
|
|||||||
await localStore.set(state)
|
await localStore.set(state)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// log error so we dont break the pipeline
|
// log error so we dont break the pipeline
|
||||||
|
captureException(err)
|
||||||
log.error('error setting state in local store:', err)
|
log.error('error setting state in local store:', err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user