nestjs-sentry
nestjs-sentry copied to clipboard
Unable to resolve signature of property decorator when called as an expression
The following code generates the error "Unable to resolve signature of property decorator when called as an expression" from InjectSentry()
import { Catch, ArgumentsHost } from '@nestjs/common'
import { BaseExceptionFilter } from '@nestjs/core'
import { InjectSentry, SentryService } from '@ntegral/nestjs-sentry'
@Catch()
export class AllExceptionsFilter extends BaseExceptionFilter {
@InjectSentry() private readonly sentry: SentryService
catch(exception: unknown, host: ArgumentsHost): void {
const Sentry = this.sentry.instance()
Sentry.captureException(exception)
super.catch(exception, host)
}
}