Skip to content

ledger_entry returns bad error when given invalid request #5168

@shawnxie999

Description

@shawnxie999

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": []
                }
            ]
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions