Closed ramfox closed 6 years ago
@dustmop I can close this bug with a work around for now, but it doesn't get to heart of this issue.
You mentioned that qri body
will be subsumed into qri get
, is that still the plan?
What do we think about a world where we pass lib.LookupBody
a datasetRef, rather than just a path and handle all the canonicalizing/handling local vs peer down there.
Ah, sorry, just saw the comment here. My recommendation for the better (and still easy) fix is in the PR. Even if body
will soon get merged, the api will still probably have some specific code so this should be fixed.
curl -X GET http://localhost:2503/body/at/ipfs/QmPtQDdt8UJJmorRacAna2vjyzVP8KQi35HWPXNGpSemrf?page=1
gets this response:
First, the
/body
endpoint callsCanonicalizeDatasetRef
, which returns a500
repo: not found
error. This error is being written to theResponseWriter
. It then proceeds to callLookUpBody
which gets the peer's dataset body and returns it.This response cannot be parsed correctly by the frontend.