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

[Feature] [BanyanDB] Return rich error with canonical status codes #8830

Closed
3 tasks done
lujiajing1126 opened this issue Apr 7, 2022 · 1 comment · Fixed by apache/skywalking-banyandb#100
Closed
3 tasks done
Assignees
Labels
database BanyanDB - SkyWalking native database feature New feature

Comments

@lujiajing1126
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

We use gRPC protocol for skywalking-banyandb, but currently we simply return standard errors.Error from go stdlib when error occurs.

grpc/grpc-go#1581 (comment)

Quoted:

It's not explicitly documented now.
In the doc for status package, there's this line that conveys the same message:

gRPC service handlers should return an error created by this package, and 
gRPC clients should expect a corresponding error to be returned from the RPC call

Etcd is doing exactly what we want,

Some other references:

Use case

...

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@lujiajing1126 lujiajing1126 added the feature New feature label Apr 7, 2022
@lujiajing1126 lujiajing1126 added this to the BanyanDB - 0.1.0 milestone Apr 7, 2022
@lujiajing1126 lujiajing1126 self-assigned this Apr 7, 2022
@lujiajing1126 lujiajing1126 added the database BanyanDB - SkyWalking native database label Apr 7, 2022
@hanahmily
Copy link
Contributor

I tend to introduce some codes to handle errors gracefully

  • InvalidArgument. This means the client input fails validation.
  • NotFound. This denotes a resource that is not found.
  • AlreadyExists: This indicates the resource already exists for creating one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database BanyanDB - SkyWalking native database feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants