12 lines
296 B
JavaScript
12 lines
296 B
JavaScript
/* istanbul ignore file */
|
|
const Sentry = require( '@sentry/node' )
|
|
|
|
module.exports = function ( { err, kind, extras } ) {
|
|
Sentry.withScope( scope => {
|
|
if ( kind ) scope.setTag( 'kind', kind )
|
|
if ( extras ) scope.setExtra( 'extras', extras )
|
|
|
|
Sentry.captureException( err )
|
|
} )
|
|
}
|