Use Api::fail() for error returns (241 sites)

Mechanically convert std::unexpected(Api::Error(ErrorCode::X, msg[, src]))
to Api::fail(ErrorCode::X, msg[, src]) across Core. Pure syntax; forwards of
existing errors (std::unexpected(x.error())) are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 4.8 committed 2026-06-22 22:07:18 +03:00
1 parent f8757d6040
commit 23759899bb
14 files changed
+344 -435

No files matched your search

+2 -2
View File
@@ -90,8 +90,8 @@ namespace Echoion::Core
auto result = client.send(vreq);
if (!result) {
return std::unexpected(Api::Error(Api::ErrorCode::NetworkError,
result.error().message()));
return Api::fail(Api::ErrorCode::NetworkError,
result.error().message());
}
return to_api_response(std::move(*result));
}