From 1369eaeef6dbeaea6ccb67f30449f8d97b05636a Mon Sep 17 00:00:00 2001 From: Alex Kremer Date: Wed, 30 Nov 2022 15:02:43 +0000 Subject: [PATCH] Add custom error for malformed request (#414) Fixes #276 --- src/rpc/handlers/LedgerEntry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/handlers/LedgerEntry.cpp b/src/rpc/handlers/LedgerEntry.cpp index 6df704bf..45c3beac 100644 --- a/src/rpc/handlers/LedgerEntry.cpp +++ b/src/rpc/handlers/LedgerEntry.cpp @@ -38,7 +38,7 @@ doLedgerEntry(Context const& context) return Status{RippledError::rpcINVALID_PARAMS, "indexNotString"}; if (!key.parseHex(request.at(JS(index)).as_string().c_str())) - return Status{RippledError::rpcINVALID_PARAMS, "malformedIndex"}; + return Status{ClioError::rpcMALFORMED_REQUEST}; } else if (request.contains(JS(account_root))) {