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

ledger_entry returns bad error when given invalid request #5168

Open
shawnxie999 opened this issue Oct 29, 2024 · 0 comments
Open

ledger_entry returns bad error when given invalid request #5168

shawnxie999 opened this issue Oct 29, 2024 · 0 comments
Labels

Comments

@shawnxie999
Copy link
Collaborator

shawnxie999 commented Oct 29, 2024

Issue Description

When ledger_entry object field is specified with invalid param like [], 0, etc, the response sometimes return internal error, or even no error at all

Steps to Reproduce

Request:

"method": "ledger_entry",
    "params": [
        {
   
                "oracle": []
      
        }
    ]

Actual Response:

"result": {
        "error": "internal",
        "error_code": 73,
        "error_message": "Internal error.",
        "request": {
            "command": "ledger_entry",
            "oracle": []
        },
        "status": "error"
    }

Expected response (clio returns the following err msg which seems more reasonable, so currently there is a discrepancy between clio and rippled):

"result": {
        "error": "malformedRequest",
        "error_code": 5001,
        "error_message": "Malformed request.",
        "status": "error",
        "type": "response",
        "request": {
            "method": "ledger_entry",
            "params": [
                {
                    "oracle": []
                }
            ]
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant