mirror of
https://github.com/XRPLF/clio.git
synced 2026-07-27 00:50:39 +00:00
chore: Remove explicit accountNotFound message (#2978)
I searched rippled code, and there is no `accountNotFound` anywhere. So, we should probably stick to the default, it looks reasonable
This commit is contained in:
@@ -107,7 +107,7 @@ AccountChannelsHandler::process(
|
||||
);
|
||||
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
auto const destAccountID = input.destinationAccount
|
||||
? accountFromStringStrict(input.destinationAccount.value())
|
||||
|
||||
@@ -65,7 +65,7 @@ AccountCurrenciesHandler::process(
|
||||
ripple::keylet::account(*accountID).key, lgrInfo.seq, ctx.yield
|
||||
);
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
Output response;
|
||||
auto const addToResponse = [&](ripple::SLE const sle) {
|
||||
|
||||
@@ -156,7 +156,7 @@ AccountLinesHandler::process(AccountLinesHandler::Input const& input, Context co
|
||||
);
|
||||
|
||||
if (not accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
auto const peerAccountID =
|
||||
input.peer ? accountFromStringStrict(*(input.peer)) : std::optional<ripple::AccountID>{};
|
||||
|
||||
@@ -68,7 +68,7 @@ AccountNFTsHandler::process(AccountNFTsHandler::Input const& input, Context cons
|
||||
);
|
||||
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
auto response = Output{};
|
||||
response.account = input.account;
|
||||
|
||||
@@ -69,7 +69,7 @@ AccountObjectsHandler::process(AccountObjectsHandler::Input const& input, Contex
|
||||
);
|
||||
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
auto typeFilter = std::optional<std::vector<ripple::LedgerEntryType>>{};
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ AccountOffersHandler::process(AccountOffersHandler::Input const& input, Context
|
||||
);
|
||||
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
Output response;
|
||||
response.account = ripple::to_string(*accountID);
|
||||
|
||||
@@ -80,7 +80,7 @@ GatewayBalancesHandler::process(
|
||||
);
|
||||
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
auto output = GatewayBalancesHandler::Output{};
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ NFTsByIssuerHandler::process(NFTsByIssuerHandler::Input const& input, Context co
|
||||
);
|
||||
|
||||
if (!accountLedgerObject)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
std::optional<uint256> cursor;
|
||||
if (input.marker)
|
||||
|
||||
@@ -74,7 +74,7 @@ NoRippleCheckHandler::process(NoRippleCheckHandler::Input const& input, Context
|
||||
auto const accountObj = sharedPtrBackend_->fetchLedgerObject(keylet, lgrInfo.seq, ctx.yield);
|
||||
|
||||
if (!accountObj)
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND, "accountNotFound"}};
|
||||
return Error{Status{RippledError::rpcACT_NOT_FOUND}};
|
||||
|
||||
auto it = ripple::SerialIter{accountObj->data(), accountObj->size()};
|
||||
auto sle = ripple::SLE{it, keylet};
|
||||
|
||||
@@ -453,7 +453,7 @@ TEST_F(RPCAccountChannelsHandlerTest, NonExistAccount)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ TEST_F(RPCAccountCurrenciesHandlerTest, AccountNotExist)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -493,7 +493,7 @@ TEST_F(RPCAccountLinesHandlerTest, NonExistAccount)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ TEST_F(RPCAccountNFTsHandlerTest, AccountNotFound)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ TEST_F(RPCAccountObjectsHandlerTest, AccountNotExist)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ TEST_F(RPCAccountOffersHandlerTest, AccountNotFound)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ TEST_F(RPCGatewayBalancesHandlerTest, AccountNotFound)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@ TEST_F(RPCNFTsByIssuerHandlerTest, AccountNotFound)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ TEST_F(RPCNoRippleCheckTest, AccountNotExist)
|
||||
ASSERT_FALSE(output);
|
||||
auto const err = rpc::makeError(output.result.error());
|
||||
EXPECT_EQ(err.at("error").as_string(), "actNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "accountNotFound");
|
||||
EXPECT_EQ(err.at("error_message").as_string(), "Account not found.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user