@exodus/error-tracking
A simple namespaces error tracking package to let any feature collect errors and create the report
Install
yarn add @exodus/error-tracking
Usage
This feature is designed to be used together with @exodus/headless
. See using the sdk.
Play with it
- Open the playground https://exodus-hydra.pages.dev/features/errors
- Try out the some methods via the UI. These corresponds 1:1 with the
exodus.errors
API. - Run
await exodus.errors.track({ namespace: 'balances', error: 'Encountered an issue when computing total balances', context: {} })
in the Dev Tools Console.
API Side
See using the sdk for more details on how features plug into the SDK and the API interface in the type declaration.
await exodus.errors.track({ namespace, error, context: {} })
await exodus.errors.trackRemote({ error })
If you're building a feature and like to use error tracking inside that feature, you can depend on errorTracking
and will receive the module with a track method that is auto-namespaced to your feature id.