commit | 4b01811a1f2b878a6a66ec57be92799659abea50 | [log] [tgz] |
---|---|---|
author | Eric Boren <borenet@google.com> | Wed Nov 06 14:43:36 2019 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Wed Nov 06 20:17:48 2019 +0000 |
tree | c546088032da67a45d261d366e4c061d98960a85 | |
parent | 713c5a0e07e37fb2e0f192d3ccbf6c68cb2a1ac5 [diff] |
[task scheduler] Fix /json/job endpoint for unknown job Change-Id: Iad0be0ae9bdda4066ec645bb4f750a6a5d694d84 Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/253178 Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com> Commit-Queue: Eric Boren <borenet@google.com>
diff --git a/task_scheduler/go/task-scheduler-fe/main.go b/task_scheduler/go/task-scheduler-fe/main.go index 0f477a2..9331182 100644 --- a/task_scheduler/go/task-scheduler-fe/main.go +++ b/task_scheduler/go/task-scheduler-fe/main.go
@@ -310,6 +310,10 @@ httputils.ReportError(w, err, "Error retrieving Job.", http.StatusInternalServerError) return } + if job == nil { + http.Error(w, "Unknown Job", 404) + return + } // Retrieve the task specs, so that we can include the task dimensions // in the results.