api/v0/resolve returns invalid JSON #10428
Labels
kind/bug
A bug in existing code (including security flaws)
need/triage
Needs initial labeling and prioritization
Checklist
Installation method
ipfs-update or dist.ipfs.tech
Version
Config
lmk if you really need it
Description
i'm working on gateway conformance tests in @helia/verified-fetch and ran into issues with resolving IPFS_NS_MAP peerIds when calling the
${kuboGateway}/api/v0/resolve/${peerId}
endpoint:There is a
/n
appended to the end, which makes parsing the response as JSON annoying. i.e. you can't just do:and instead need to do:
const peerJson = JSON.parse(await peerResponse.text()).trim())
The text was updated successfully, but these errors were encountered: