mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 09:18:02 +00:00
Add rpcLGR_IDX_MALFORMED error messages to ledger sequence min and max out of range conditionals (#336)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <backend/BackendInterface.h>
|
||||
#include <rpc/RPCHelpers.h>
|
||||
#include <webserver/WsBase.h>
|
||||
|
||||
namespace RPC {
|
||||
|
||||
std::optional<bool>
|
||||
@@ -1473,7 +1471,6 @@ parseTaker(boost::json::value const& taker)
|
||||
return Status{Error::rpcINVALID_PARAMS, "invalidTakerAccount"};
|
||||
return *takerID;
|
||||
}
|
||||
|
||||
bool
|
||||
specifiesCurrentOrClosedLedger(boost::json::object const& request)
|
||||
{
|
||||
@@ -1571,7 +1568,7 @@ traverseTransactions(
|
||||
if (context.range.maxSequence < min.as_int64() ||
|
||||
context.range.minSequence > min.as_int64())
|
||||
return Status{
|
||||
Error::rpcINVALID_PARAMS, "ledgerSeqMinOutOfRange"};
|
||||
Error::rpcLGR_IDX_MALFORMED, "ledgerSeqMinOutOfRange"};
|
||||
else
|
||||
minIndex = boost::json::value_to<std::uint32_t>(min);
|
||||
}
|
||||
@@ -1593,7 +1590,7 @@ traverseTransactions(
|
||||
if (context.range.maxSequence < max.as_int64() ||
|
||||
context.range.minSequence > max.as_int64())
|
||||
return Status{
|
||||
Error::rpcINVALID_PARAMS, "ledgerSeqMaxOutOfRange"};
|
||||
Error::rpcLGR_IDX_MALFORMED, "ledgerSeqMaxOutOfRange"};
|
||||
else
|
||||
maxIndex = boost::json::value_to<std::uint32_t>(max);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user