Open mounikakun opened 7 months ago
This is a rippled
inconsistency. Clio does not include ledger_hash
and ledger_index
in error responses.
Neither does rippled
for most APIs. This appears to be an oversight on rippled
's amm_info
implementation.
I suggest we update the docs instead specifying that ledger_hash
, ledger_index
and ledger_index_current
may be omitted in error responses.
We can leave rippled
's implementation as-is since those fields could be considered "extra" fields in the output which is not an API breakage.
@Bronek, please take a look. This may be something that could be improved on rippled
side.
@mDuo13 can you take a look and advise how you would like to document this if at all. Currently we don't see specific error message documentation for this (or other) method on the xrpl.org website.
edit: I now noticed the "The response follows the standard format, with a successful result containing the following fields:" that seems to be on each API doc. Does this suggest that only successful responses should have these fields?
Note, showing extra fields in responses is fair play; especially if these fields are not documented (so they do not officially fall into API interface). I do not think you need to reproduce rippled
behaviour here, this seems to be more of a documentation issue.
Request:
Rippled response:
Clio response: