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

IPFS: disambiguating API errors uses fragile string comparisons #31

Open
djdv opened this issue Jun 29, 2023 · 0 comments
Open

IPFS: disambiguating API errors uses fragile string comparisons #31

djdv opened this issue Jun 29, 2023 · 0 comments

Comments

@djdv
Copy link
Owner

djdv commented Jun 29, 2023

Extracted from: #27 (comment)

This might get resolved in ipfs/go-ipld-format#76

I have to double check all the call sites to see if we still even receive errors from the core API.
resolveErrKind was written and errors were added when they were needed, but not removed during refactors.
Specifically, we first used core.Resolve{Path,Node} before switching to node.Resolve.
Which iirc is why there's 2 different sets of error checks.

This concern might get blasted away if we switch to a resolver.Resolver. (rel: #29)
But this is not yet clear. We'd have to see what values the resolver returns and if they're defined with Go 1.13 error conventions.

Other projects have encountered this same issue: https://github.com/ipfs/boxo/blob/0927be43c36cf7d1c557e65157cab9301b8a89f3/gateway/errors.go#L175

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

No branches or pull requests

1 participant