XRPLF / clio

An XRP Ledger API Server
https://xrpl.org
ISC License
57 stars 48 forks source link

"account_nfts" with incorrect account returns "invalidParams" instead of "actNotFound" error #330

Closed mounikakun closed 1 year ago

mounikakun commented 1 year ago

Sample request: { "method": "account_nfts", "params": [{ "account": "rhuEDQ2Q9UeTfu1LBWq7ZzxgrfYV6P5", "ledger_index": "validated" }] } Response: { "result": { "error": "invalidParams", "error_code": 31, "error_message": "accountMalformed", "status": "error", "type": "response", "request": { "method": "account_nfts", "params": [ { "account": "fgdhj", "ledger_index": "validated" } ] } }, "warnings": [ { "id": 2001, "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request" } ] }

mounikakun commented 1 year ago

invalidParams - One or more fields are specified incorrectly, or one or more required fields are missing.

actNotFound - The Address specified in the account field of the request does not correspond to an account in the ledger. [(https://xrpl.org/account_nfts.html#account_nfts)]

"account" in sample response is malformed account so is this rippled or Clio bug?

cjcobb23 commented 1 year ago

The account in the request is actually malformed, as opposed to a proper account. I don't think actNotFound is the proper error here. What does rippled return?

mounikakun commented 1 year ago

yes the account in the request is malformed one but rippled is returning actNotFound error. It might be an issue with rippled.

cjcobb23 commented 1 year ago

its treating the string as a seed. This is bad practice, but I guess in the vein of mirroring rippled, we should do the same

cjcobb23 commented 1 year ago

We decided to not treat arbitrary strings as account seeds in the API. This should be returning account malformed now.

mounikakun commented 1 year ago

Clio response is returning actMalformed now and as it was decided to not mirror rippled response I am closing this issue.