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:
1 parent
f8757d6040
commit
23759899bb
14 files changed
+344
-435
No files matched your search
@@ -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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user