Skip to content

Provide errors to failed client promises rather than a status #859

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

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jun 25, 2020

Motivation:

If an RPC fails for some reason we will convert the error into an
appropriate GRPCStatus. This status is used to succeed the status
promise and fail any other promises (initial and trailing metadata, and
if applicable, the response promise). Without looking at logs it's
harder to determine the exact nature of the error.

Modifications:

  • Fail the initial metadata, trailing metadata and response promise with
    the error that the status was derived from.

Result:

More helpful errors.

@glbrntt glbrntt added nio 🆕 semver/minor Adds new public API. labels Jun 25, 2020
@glbrntt glbrntt requested a review from Lukasa June 25, 2020 13:52
Motivation:

If an RPC fails for some reason we will convert the error into an
appropriate `GRPCStatus`. This status is used to succeed the status
promise and fail any other promises (initial and trailing metadata, and
if applicable, the response promise). Without looking at logs it's
harder to determine the exact nature of the error.

Modifications:

- Fail the initial metadata, trailing metadata and response promise with
  the error that the status was derived from.

Result:

More helpful errors.
@glbrntt glbrntt force-pushed the gb-better-errors branch from 4cf5802 to bb9f57b Compare June 25, 2020 15:34
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a really good addition, I like it a lot.

@glbrntt glbrntt merged commit b6fca17 into grpc:master Jun 25, 2020
@glbrntt glbrntt deleted the gb-better-errors branch June 25, 2020 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants