mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
@@ -79,7 +79,9 @@ getErrorInfo(ClioError code)
|
||||
{ClioError::rpcMALFORMED_OWNER, "malformedOwner", "Malformed owner."},
|
||||
{ClioError::rpcMALFORMED_ADDRESS, "malformedAddress", "Malformed address."},
|
||||
{ClioError::rpcINVALID_HOT_WALLET, "invalidHotWallet", "Invalid hot wallet."},
|
||||
{ClioError::rpcINVALID_API_VERSION, JS(invalid_API_version), "Invalid API version."}};
|
||||
{ClioError::rpcUNKNOWN_OPTION, "unknownOption", "Unknown option."},
|
||||
{ClioError::rpcINVALID_API_VERSION, JS(invalid_API_version), "Invalid API version."},
|
||||
};
|
||||
|
||||
auto matchByCode = [code](auto const& info) { return info.code == code; };
|
||||
if (auto it = find_if(begin(infos), end(infos), matchByCode); it != end(infos))
|
||||
|
||||
@@ -40,6 +40,7 @@ enum class ClioError {
|
||||
rpcMALFORMED_OWNER = 5002,
|
||||
rpcMALFORMED_ADDRESS = 5003,
|
||||
rpcINVALID_HOT_WALLET = 5004,
|
||||
rpcUNKNOWN_OPTION = 5005,
|
||||
|
||||
// special system errors start with 6000
|
||||
rpcINVALID_API_VERSION = 6000,
|
||||
|
||||
@@ -82,7 +82,7 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input input, Context const& ctx)
|
||||
else
|
||||
{
|
||||
// Must specify 1 of the following fields to indicate what type
|
||||
return Error{Status{RippledError::rpcINVALID_PARAMS, "unknownOption"}};
|
||||
return Error{Status{ClioError::rpcUNKNOWN_OPTION}};
|
||||
}
|
||||
|
||||
// check ledger exists
|
||||
|
||||
@@ -99,8 +99,8 @@ generateTestValuesForParametersTest()
|
||||
"UnknownOption",
|
||||
R"({
|
||||
})",
|
||||
"invalidParams",
|
||||
"unknownOption"},
|
||||
"unknownOption",
|
||||
"Unknown option."},
|
||||
|
||||
ParamTestCaseBundle{
|
||||
"InvalidDepositPreauthType",
|
||||
|
||||
Reference in New Issue
Block a user