| Index: scheduler/appengine/ui/job.go
|
| diff --git a/scheduler/appengine/ui/job.go b/scheduler/appengine/ui/job.go
|
| index ebc617215ee2412b724b818e90b988b47d6c81bb..2bbe8abaaf20dada5c4c8633c22b359a37d3792a 100644
|
| --- a/scheduler/appengine/ui/job.go
|
| +++ b/scheduler/appengine/ui/job.go
|
| @@ -37,12 +37,12 @@ func jobPage(ctx *router.Context) {
|
|
|
| // Grab the job from the datastore.
|
| job, err := config(c).Engine.GetVisibleJob(c, projectID+"/"+jobName)
|
| - if err != nil {
|
| - panic(err)
|
| - }
|
| - if job == nil {
|
| + switch {
|
| + case err == engine.ErrNoSuchJob:
|
| http.Error(w, "No such job or no access to it", http.StatusNotFound)
|
| return
|
| + case err != nil:
|
| + panic(err)
|
| }
|
|
|
| // Grab latest invocations from the datastore.
|
|
|