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

DelegatorDelegations query - return wrong error code(GRPC-staking/DelegatorDelegations) #8652

Closed
4 tasks
carameleon opened this issue Feb 21, 2021 · 2 comments · Fixed by #9015
Closed
4 tasks
Assignees
Labels
Milestone

Comments

@carameleon
Copy link

Summary of Bug

GRPC staking/Delegator/Delecagtion query return wrong error code when they are not found status.

=== TestGetDelegatorDelegations
rpc error: code = Unknown desc = rpc error: code = NotFound desc = unable to find delegations for address cosmos19m7kcekvusqkc59sen0423gyv3ry0sl9dajs90: key not found
status.Convert(err).Code() :  Unknown

it have to return Not found not Unknown

it is implemented "google.golang.org/grpc/status"

	// The gRPC framework will generate this error code in the above two
	// mentioned cases.
	Unknown Code = 2
        ...
	NotFound Code = 5

Version

Steps to Reproduce


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@carameleon
Copy link
Author

I gonna implement with Unknown to handle this case temporarilly.

@zmanian
Copy link
Member

zmanian commented Feb 24, 2021

If I look at the error, it seems like an Unknown error is wrapping a NotFound error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants