From d94fe4e7ab73255876785cc5e477f8dd3caacdd8 Mon Sep 17 00:00:00 2001 From: Alex Kremer Date: Mon, 15 May 2023 11:28:24 +0100 Subject: [PATCH] Fix nft_history error to match rippled (#635) Fixes #633 --- src/rpc/handlers/NFTHistory.cpp | 2 +- unittests/rpc/handlers/NFTHistoryTest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/handlers/NFTHistory.cpp b/src/rpc/handlers/NFTHistory.cpp index 84af70ca..4c2faaa6 100644 --- a/src/rpc/handlers/NFTHistory.cpp +++ b/src/rpc/handlers/NFTHistory.cpp @@ -47,7 +47,7 @@ NFTHistoryHandler::process(NFTHistoryHandler::Input input, Context const& ctx) c } if (minIndex > maxIndex) - return Error{Status{RippledError::rpcINVALID_PARAMS, "invalidIndex"}}; + return Error{Status{RippledError::rpcLGR_IDXS_INVALID}}; if (input.ledgerHash || input.ledgerIndex) { diff --git a/unittests/rpc/handlers/NFTHistoryTest.cpp b/unittests/rpc/handlers/NFTHistoryTest.cpp index 84f17d78..57afc4cb 100644 --- a/unittests/rpc/handlers/NFTHistoryTest.cpp +++ b/unittests/rpc/handlers/NFTHistoryTest.cpp @@ -181,8 +181,8 @@ generateTestValuesForParametersTest() "ledger_index_max": 11, "ledger_index_min": 20 })", - "invalidParams", - "invalidIndex"}, + "lgrIdxsInvalid", + "Ledger indexes invalid."}, NFTHistoryParamTestCaseBundle{ "LedgerIndexMaxMinAndLedgerIndex", R"({