diff --git a/src/CraneCtld/CtldGrpcServer.cpp b/src/CraneCtld/CtldGrpcServer.cpp index 5033ef774..fda7b2d66 100644 --- a/src/CraneCtld/CtldGrpcServer.cpp +++ b/src/CraneCtld/CtldGrpcServer.cpp @@ -977,6 +977,11 @@ CtldServer::SubmitTaskToScheduler(std::unique_ptr task) { g_task_scheduler->SubmitTaskAsync(std::move(task)); return {std::move(future)}; } + + if (result.has_error()) { + CRANE_DEBUG("Task submission failed. Reason: {}.", result.error().second); + return result::fail(result.error().second); + } } } // namespace Ctld