My apologies about how long this has taken, but there were a few interesting things that came up during this PR.
when nock returns a 400 http response @digitalbazaar/http-client adds the resulting data to the error object and not the error.response object. (this is probably the case with real requests too)
When sending to the ledgerQueryService we were using the form query/?id='foo' this is fine as express treats that url as equivalent to query?id=foo, but I changed the tests and the path to match the documented route in bedrock-ledger-agent
bedrock-ledger-agent already does end tests using the form query?id='foo' I tested it with /?id and without and it worked with either path.
jsonld headers were added to tests that return jsonld
nock was upgraded so that when using reply it will set a content-type from the response body if no content-type is provided.
My apologies about how long this has taken, but there were a few interesting things that came up during this PR.
@digitalbazaar/http-client
adds the resulting data to theerror
object and not theerror.response
object. (this is probably the case with real requests too)ledgerQueryService
we were using the formquery/?id='foo'
this is fine as express treats that url as equivalent toquery?id=foo
, but I changed the tests and the path to match the documented route inbedrock-ledger-agent
bedrock-ledger-agent
already does end tests using the formquery?id='foo'
I tested it with/?id
and without and it worked with either path.