mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-01 17:15:52 +00:00
Use "invalidParam" when "book_offers" taker format is wrong (#734)
Fix #735
This commit is contained in:
@@ -90,7 +90,10 @@ public:
|
||||
{JS(issuer),
|
||||
validation::WithCustomError{
|
||||
validation::IssuerValidator, Status(RippledError::rpcSRC_ISR_MALFORMED)}}}},
|
||||
{JS(taker), validation::AccountValidator},
|
||||
// return INVALID_PARAMS if account format is wrong for "taker"
|
||||
{JS(taker),
|
||||
validation::WithCustomError{
|
||||
validation::AccountValidator, Status(RippledError::rpcINVALID_PARAMS, "Invalid field 'taker'")}},
|
||||
{JS(limit), validation::Type<uint32_t>{}, validation::Between{1, 100}},
|
||||
{JS(ledger_hash), validation::Uint256HexStringValidator},
|
||||
{JS(ledger_index), validation::LedgerIndexValidator},
|
||||
|
||||
@@ -255,8 +255,8 @@ generateParameterBookOffersTestBundles()
|
||||
},
|
||||
"taker": "123"
|
||||
})",
|
||||
"actMalformed",
|
||||
"takerMalformed"},
|
||||
"invalidParams",
|
||||
"Invalid field 'taker'"},
|
||||
ParameterTestBundle{
|
||||
"TakerNotString",
|
||||
R"({
|
||||
@@ -272,7 +272,7 @@ generateParameterBookOffersTestBundles()
|
||||
"taker": 123
|
||||
})",
|
||||
"invalidParams",
|
||||
"takerNotString"},
|
||||
"Invalid field 'taker'"},
|
||||
ParameterTestBundle{
|
||||
"LimitNotInt",
|
||||
R"({
|
||||
|
||||
Reference in New Issue
Block a user