-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sdkerrors: make Wrap compatible with Go standard library errors extractors #7846
Comments
You mean Regardless, I believe @ethanfrey brought over the errors pkg from Weave so we can expose stracktraces? I would be ideal to just use the stdlib wrapping while keeping our ABCI error types. |
…n an error (#7770) * unknownproto: check result from protowire.ConsumeFieldValue and return error Given that protowire.ConsumeFieldValue returns -1 when it encounters an error, perform a check for n < 0 and return the respectively obtained error with context about the details. Fixes an issue identified from a go-fuzz session, thanks to Ethan Buchman and the IBC auditors from Informal Systems et al. Fixes #7739. * Address AlexanderBez's suggestions * Use require in tests * Add issue #7846 to TODO Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Yeah, I wanted something like
I haven't touched this in about a year, but my guess is usage error (which needs a better API/docs). The main point is if you wrap std errors, you have no abci code and it all ends up as 1 - Internal (and redacted at the abci boundary). You are supposed to use a proper nb: I have no idea if anyone ever uses those error codes in any client, but that is a different story |
Also, there is |
this was done by Aaron in the new errors module. |
Coming here from tip 5903586 and PR #7770 in which I tried to invoke
where err was an io.UnexpectedEOF, and then later I tried to do
but it fails because sdkerrors stringifies content, thus to perform the check I had to resort to a hack
This issue isn't critical, but just a nice-to-have.
For Admin Use
The text was updated successfully, but these errors were encountered: