Update error message for go-ipld-prime path resolution#75
Update error message for go-ipld-prime path resolution#75
Conversation
|
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
|
ah, I've just discovered #67, so this is a dupe, with a different approach, will close this if that gets merged |
|
NM -- this is a dupe. Closing. |
Arising out of the go-ipld-prime in go-ipfs work. Failing @ ipfs/kubo#7995
@hannahhoward's updates to go-path now use go-ipld-prime selector traversal to do path resolution and we get more verbose error messages.
In this change I'm allowing both the old and the new style error messages. I'm unsure if that's appropriate or not but it seems to me that coordinating this getting up through go-ipfs-http-client to go-ipfs is going to be awkward enough that being a little more lax about exact message is fine and can be resolved at some future date. I'm also making an assumption that we shouldn't be trying to emulate the old style error message when the new one is more informative.
While I'm in here, I'm not sure this test is doing what it should be testing. We have a block that looks like
{"foo": {"bar": "baz"}}with CIDX, then we're requesting a path through that block:X/bar/bazwhere there is nobarat the top level. This test is called "InvalidPathRemainder" but it's not even getting started. Is it testing what it should be testing? Was it supposed to be testingX/foo/bar/bazperhaps? 🤷 maybe we could clarify what this test is supposed to be doing while in here.