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

[get_aggregate_price] with malformed oracle_document_id value returns different error on Clio compared to rippled. #4999

Open
mounikakun opened this issue Apr 23, 2024 · 0 comments

Comments

@mounikakun
Copy link
Collaborator

Issue Description

Clio returns malformedDocumentID whereas rippled returns entryNotFound with malformed oracle_document_id values in ledger_entry.

Clio error is more descriptive compare to rippled. Would like more thoughts on this.

Steps to Reproduce

  • Create an oracle.
  • Send a ledger_entry request with malformed oracle_document_id value.
  • Malformed oracle_document_id values: None, decimal(1.2)

Request:

{
  "method": "ledger_entry",
  "params" : [
    {
      "oracle" : {
        "account": "rsbRFsph8AUY8zMNHfvLn9jxBxLKhgWc4j",
        "oracle_document_id":  1.2
      },
      "ledger_index": "validated"
    }
  ]
}

Expected Result

Rippled response:

{
    "result": {
        "error": "entryNotFound",
        "error_message": null,
        "ledger_hash": "A94D8AD4F72A40D3B491C756C9690AD516C1759D929ED08E43CAAF7BB62016B1",
        "ledger_index": 86953,
        "request": {
            "command": "ledger_entry",
            "ledger_index": "validated",
            "oracle": {
                "account": "rsbRFsph8AUY8zMNHfvLn9jxBxLKhgWc4j",
                "oracle_document_id": 1.2
            }
        },
        "status": "error",
        "validated": true
    }
}

Actual Result

Clio response:

{
    "result": {
        "error": "malformedDocumentID",
        "error_code": 5007,
        "error_message": "Malformed oracle_document_id.",
        "status": "error",
        "type": "response",
        "request": {
            "method": "ledger_entry",
            "params": [
                {
                    "oracle": {
                        "account": "rsbRFsph8AUY8zMNHfvLn9jxBxLKhgWc4j",
                        "oracle_document_id": 1.2E0
                    },
                    "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"
        }
    ]
}

Environment

Supporting Files

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