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:
Ayaz Salikhov
2026-03-09 17:17:09 +00:00
committed by GitHub
parent fbdd6d6105
commit 2b8a7b95e4
18 changed files with 18 additions and 18 deletions

View File

@@ -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())

View File

@@ -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) {

View File

@@ -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>{};

View File

@@ -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;

View File

@@ -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>>{};

View File

@@ -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);

View File

@@ -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{};

View File

@@ -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)

View File

@@ -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};

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}

View File

@@ -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.");
});
}