Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/ApiService/ApiService/Functions/Jobs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,16 @@ private async Task<HttpResponseData> Post(HttpRequestData req) {
var r = await _context.JobOperations.Insert(job);
if (!r.IsOk) {
_logTracer.WithTag("HttpRequest", "POST").WithHttpStatus(r.ErrorV).Error($"failed to insert job {job.JobId:Tag:JobId}");
return await _context.RequestHandling.NotOk(
req,
new Error(
Code: ErrorCode.UNABLE_TO_CREATE,
Errors: new string[] { "unable to create job " }
),
"job");
}
await _context.Events.SendEvent(new EventJobCreated(job.JobId, job.Config, job.UserInfo));

return await RequestHandling.Ok(req, JobResponse.ForJob(job));
}

Expand Down