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

Nest.js support gRPC Exceptions Codes? #764

Closed
coderdiaz opened this issue Jun 5, 2018 · 2 comments
Closed

Nest.js support gRPC Exceptions Codes? #764

coderdiaz opened this issue Jun 5, 2018 · 2 comments

Comments

@coderdiaz
Copy link

I'm submitting a...

[ ] Regression
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[x] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

  • This returns always CODE 2: UNKNOWN: Exception message.

Expected behavior

  • Return a correctly exception codes. Eg. CODE 5: NOT_FOUND.
@coderdiaz
Copy link
Author

Fixed with:

throw new RpcException({
  code: GrpcStatus.NOT_FOUND,
  message: 'Explicit message in'
})

@lock
Copy link

lock bot commented Sep 24, 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 Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant