aboutsummaryrefslogtreecommitdiff
path: root/zenserver/compute/apply.cpp
diff options
context:
space:
mode:
authorJoe Kirchoff <[email protected]>2021-11-18 08:55:39 -0800
committerJoe Kirchoff <[email protected]>2021-11-18 08:55:39 -0800
commitdde39a77504a85441be6907ef5524f1c55471035 (patch)
treea96a3b52cfcaa3c132581f31c242276173d2df0c /zenserver/compute/apply.cpp
parentChange error code for failed upsteam apply (diff)
downloadzen-dde39a77504a85441be6907ef5524f1c55471035.tar.xz
zen-dde39a77504a85441be6907ef5524f1c55471035.zip
Add errorcode to output when a task fails
Diffstat (limited to 'zenserver/compute/apply.cpp')
-rw-r--r--zenserver/compute/apply.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp
index 8ad14a1ed..1f18b054f 100644
--- a/zenserver/compute/apply.cpp
+++ b/zenserver/compute/apply.cpp
@@ -924,15 +924,16 @@ HttpFunctionService::ExecActionUpstreamResult(const IoHash& WorkerId, const IoHa
GetUpstreamApplyResult& Completed = Status.Status.Result;
if (!Completed.Success || Completed.Error.ErrorCode != 0)
{
- ZEN_ERROR("Action {}/{} failed:\n stdout: {} \n stderr: {} \n reason: {}",
+ ZEN_ERROR("Action {}/{} failed:\n stdout: {}\n stderr: {}\n reason: {}\n errorcode: {}",
WorkerId.ToHexString(),
ActionId.ToHexString(),
Completed.StdOut,
Completed.StdErr,
- Completed.Error.Reason);
- // throw std::runtime_error(
- // "Action {}/{} failed: {}"_format(WorkerId.ToHexString(), ActionId.ToHexString(), Completed.Error.Reason).c_str());
- return HttpResponseCode::BadRequest;
+ Completed.Error.Reason,
+ Completed.Error.ErrorCode);
+
+ throw std::runtime_error(
+ "Action {}/{} failed"_format(WorkerId.ToHexString(), ActionId.ToHexString()).c_str());
}
ZEN_INFO("Action {}/{} completed with {} attachments ({} compressed, {} uncompressed)",