Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“account_tx” with ledger_index_max out of range do not return "lgrIdxMalformed" error.(Version: ["1.9.2"]) #4288

Closed
mounikakun opened this issue Aug 30, 2022 · 2 comments

Comments

@mounikakun
Copy link
Collaborator

Issue Description

“account_tx” with the ledger specified by the ledger_index_max does not exist, or if it does exist but the server does not have it should return expected error: lgrIdxMalformed

Sample request

{ "method": "account_tx", "params": [ { "account": "r4s7P9WUU6AZ9DB315GWKtBaaDji9Zst8h", "binary": false, "forward": false, "ledger_index_max": 31089994, "ledger_index_min": -1 } ] }

Expected Result

"error": "lgrIdxMalformed"

Actual Result

{ "result": { "account": "r4s7P9WUU6AZ9DB315GWKtBaaDji9Zst8h", "ledger_index_max": 21320746, "ledger_index_min": 21316540, "limit": 0, "status": "success", "transactions": [], "validated": true } }

@mounikakun
Copy link
Collaborator Author

“account_tx” with the ledger specified by the ledger_index_min does not exist, or if it does exist but the server does not have it should return expected error: lgrIdxMalformed

Sample request:
{ "method": "account_tx", "params": [ { "account": "r4s7P9WUU6AZ9DB315GWKtBaaDji9Zst8h", "binary": false, "forward": false, "ledger_index_max": -1, "ledger_index_min": 9499032 } ] }

Expected Result
"error": "lgrIdxMalformed"

Actual Result
{ "result": { "account": "r4s7P9WUU6AZ9DB315GWKtBaaDji9Zst8h", "ledger_index_max": 21320817, "ledger_index_min": 21316540, "limit": 0, "status": "success", "transactions": [], "validated": true } }

@mounikakun
Copy link
Collaborator Author

“account_tx” with invalid ledger_index returns "invalidParams" instead of "lgrNotFound" error.

ckeshava pushed a commit to ckeshava/rippled that referenced this issue Jul 10, 2023
Certain inputs for the AccountTx method should return an error. In other
words, an invalid request from a user or client now results in an error
message.

Since this can change the response from the API, it is an API breaking
change. This commit maintains backward compatibility by keeping the
existing behavior for existing requests. When clients specify
"api_version": 2, they will be able to get the updated error messages.

Update unit tests to check the error based on the API version.

* Fix XRPLF#4288
* Fix XRPLF#4545
ckeshava pushed a commit to ckeshava/rippled that referenced this issue Sep 22, 2023
Certain inputs for the AccountTx method should return an error. In other
words, an invalid request from a user or client now results in an error
message.

Since this can change the response from the API, it is an API breaking
change. This commit maintains backward compatibility by keeping the
existing behavior for existing requests. When clients specify
"api_version": 2, they will be able to get the updated error messages.

Update unit tests to check the error based on the API version.

* Fix XRPLF#4288
* Fix XRPLF#4545
ckeshava pushed a commit to ckeshava/rippled that referenced this issue Sep 25, 2023
Certain inputs for the AccountTx method should return an error. In other
words, an invalid request from a user or client now results in an error
message.

Since this can change the response from the API, it is an API breaking
change. This commit maintains backward compatibility by keeping the
existing behavior for existing requests. When clients specify
"api_version": 2, they will be able to get the updated error messages.

Update unit tests to check the error based on the API version.

* Fix XRPLF#4288
* Fix XRPLF#4545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant