0.2.2 • Published 8 years ago
@ansaro/errors
Licence
ISC
Version
0.2.2
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Errors
Report errors to Sentry
yarn add @ansaro/errors
Usage
Set environment variable SENTRY_DSN to your project's client key (DSN).
reportError is an asynchronous function that takes two arguments:
Errorthe error to reportoptionsan object of optional settings
const { reportError } = require("@ansaro/errors");
async function() {
try {
...
} catch(ex) {
await reportError(ex, {
tags: {
service: "name-of-service"
}
})
}
}