Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tap(null, (exception) => {
if (this.shouldReport(exception)) {
Sentry.withScope(scope => {
// TODO: When https://github.com/nestjs/nest/issues/1581 gets implemented switch to that
switch(this.options.context){
case 'Http': return this.captureHttpException(scope, http, exception);
case 'Ws': return this.captureWsException(scope, ws, exception);
case 'Rpc': return this.captureRpcException(scope, rpc, exception);
}
});
}
})
);
upload.on('error', (e) => {
Sentry.withScope(scope => {
scope.setExtras(e.details);
scope.setExtras({ uploadOptions: options, storeOptions });
Sentry.captureException(e);
});
this.emit('upload.error', e);
});