Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnhandledPromiseRejectionWarning on invalid RMQ microservice pattern #2299

Closed
atte-backman opened this issue May 29, 2019 · 2 comments
Closed

Comments

@atte-backman
Copy link

Bug Report

Current behavior

When sending invalid JSON microservice pattern via RMQ, e.g. {ac, UnhandledPromiseRejectionWarning is being thrown:

(node:21109) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at ServerRMQ.handleMessage (.../node_modules/@nestjs/microservices/server/server-rmq.js:61:29)
    at channel.consume (.../node_modules/@nestjs/microservices/server/server-rmq.js:54:51)

Expected behavior

This situation (exception) should be gracefully handled. For instance, when sending unknown event pattern the following is being produced:

[Nest] 21398   - 05/29/2019, 1:17 PM   There is no matching event handler defined in the remote service. +352291ms

Environment


Nest version: 6.2.4

 
For Tooling issues:
- Node version: 10.15.3
- Platform:  Ubuntu 16.04.6 LTS

@atte-backman atte-backman added the needs triage This issue has not been looked into label May 29, 2019
@kamilmysliwiec
Copy link
Member

Fixed in the latest release

@BrunnerLivio BrunnerLivio added the needs triage This issue has not been looked into label Aug 8, 2019
@lock
Copy link

lock bot commented Nov 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants