Git Product home page Git Product logo

Comments (5)

ntegral avatar ntegral commented on July 30, 2024

This has been corrected in the latest version update

from nestjs-sentry.

otaviomad avatar otaviomad commented on July 30, 2024

I seem to be having the same issue. I might be doing something wrong, so here's the code:

// app.module.ts
@Module({
  imports: [
    SentryModule.forRoot({
      dsn: process.env.SENTRY_DSN,
      debug: true,
      environment: process.env.APP_ENV,
      logLevel: LogLevel.Debug,
    }),
    AuthModule,
  ]
  controllers: [AppController],
  providers: [AppService, SentryService],
  exports: [SentryService],
})
// auth.controller.ts
@UseInterceptors(SentryInterceptor)
@Controller('auth')
export class AuthController { ... }

it gives the following error:

Error: Nest can't resolve dependencies of the SentryInterceptor (?). Please make sure that the argument Object at index [0] is available in the AuthModule context.

Am I doing something wrong? Not sure what to do, already added the service to the providers and exports.

from nestjs-sentry.

boy51 avatar boy51 commented on July 30, 2024

This is still a problem in 2.x

from nestjs-sentry.

ntegral avatar ntegral commented on July 30, 2024

I'll review this issue. Thx

from nestjs-sentry.

boy51 avatar boy51 commented on July 30, 2024

@ntegral I made repro: https://github.com/boy51/ntegral-nest-sentry-error-repo/blob/main/src/app.module.ts

There are 2 branches, one shows APP_INTERCEPTOR failing and the other with UseInterceptor.

I tried to fix it but I couldn't find anything in PRs. If you can point me in the right direction i can try to make a pr

from nestjs-sentry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.