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

go: our own errors get sent out over grpc with blank message #4298

Closed
pro-wh opened this issue Oct 6, 2021 · 1 comment · Fixed by #4299
Closed

go: our own errors get sent out over grpc with blank message #4298

pro-wh opened this issue Oct 6, 2021 · 1 comment · Fixed by #4299
Labels
c:common Category: common libraries golang

Comments

@pro-wh
Copy link
Contributor

pro-wh commented Oct 6, 2021

SUMMARY

errors.Code seems to swallow the message when there's no context. when using a client other than our Go codebase, there's no facility to look up the module and code to get the message. in some cases such as through grpc-web, missing library support makes it impossible to get the module and code in the first place, and all you have is the message.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

go/common/errors

OASIS NODE VERSION
21.3
OS / ENVIRONMENT

n/a

STEPS TO REPRODUCE

Trigger an error such as submitting a staking.Allow transaction when allowances are disabled (max allowances = 0).

ACTUAL RESULTS

GRPC error message blank

EXPECTED RESULTS

GRPC error message staking: forbidden by policy

@pro-wh pro-wh added c:common Category: common libraries golang labels Oct 6, 2021
@pro-wh
Copy link
Contributor Author

pro-wh commented Oct 6, 2021

maybe better to fix this in common/grpc, judging by the name. errors.Code can continue to give context only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:common Category: common libraries golang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant