Giter Site home page Giter Site logo

Comments (4)

underfisk avatar underfisk commented on June 1, 2024

@ttshivers Are you able to give us some hand on this one?

@Nathan-Nesbitt What's the expected behavior? Would you be able to create a PR with the actual fix?

from nestjs.

Nathan-Nesbitt avatar Nathan-Nesbitt commented on June 1, 2024

I can tell you what the issue/fix might be.

I tried setting up a global exception handler with NestJS. Each time I would trigger and catch any exception with it, a second log was printed from your library. (See the log above)

For NestJS, seems next() within the handler is returning {} instead of void which is causing issues, as you've got a line of code that logs a warning each time the return type is anything but void.

The easiest fix is probably to remove the logging for that if you support NestJS exception handling. The better fix probably had to do with why it's returning {} and if that's intended or not

from nestjs.

Nathan-Nesbitt avatar Nathan-Nesbitt commented on June 1, 2024

https://github.com/golevelup/nestjs/blob/master/packages%2Frabbitmq%2Fsrc%2Famqp%2Fconnection.ts#L460

This is the location, and it's repro-able using the basic implementation of the RPC exception handler from nestJS and your subscription setup.

from nestjs.

underfisk avatar underfisk commented on June 1, 2024

@Nathan-Nesbitt Thanks for all the information.
What you're saying makes sense but this could have been an intentional API design decision as a subscription in fact should never return. Your use case of providing a nack should never happen manually therefore, you will receive a weird behaviour when throwing an error and a nack one after the other.
Unfortunately, i don't have the time to tweak this and make it so the end user can control this behaviour but if you could help us improving the existing API extending it so that the consumer can override the default behaviour i would be happy to review 😄

from nestjs.

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.