nestjs-sentry icon indicating copy to clipboard operation
nestjs-sentry copied to clipboard

Unable to resolve signature of property decorator when called as an expression

Open adrianwix opened this issue 3 years ago • 0 comments

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)
    }
}

adrianwix avatar Nov 08 '21 09:11 adrianwix