Better IPFS/ENS Error Handling (URI Resolution)
Currently the error handling in the IPFS & ENS plugins is very poor when doing URI resolution.
Some conversation around this:
"worst part right now is if ens or ipfs resolver has an exception it will catch it and throw a generic "cant resolve" error" - @nerfZael
"I think it should be more specific about the reason why it couldn't resolve the wrapper (Ex: NetworkError, TimeoutError, FileNotFoundError, etc)" - @Niraj-Kamdar
"I'd even go a bit further and show the underlying error. We already catch it but then ignore/obfuscate it. Recently, while trying to figure out what signer to use for the ethereum plugin, I had to console log the error in the ens plugin just so I could see the actual error instead of the "Unable to resolve uri" error message" - @nerfZael
One way to approach this is to modify the URI-Resolver interface to include errors in the return structure. Additionally we could define a known set of errors for common things, similar to HTTP response codes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
@nerfZael do you think this can be closed now that https://github.com/polywrap/toolchain/pull/1169 is merged?
@nerfZael do you think this can be closed now that #1169 is merged?
No, handling the resolver extension errors will be a separate PR (similar to how resolver extension caching will be)