runservice: handle run not existing
Check if the response from the readdb is null and return an http not found error
This commit is contained in:
parent
8c2f37d47c
commit
45a460ebc0
|
@ -396,6 +396,10 @@ func (h *RunHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if run == nil {
|
||||
httpError(w, util.NewErrNotFound(errors.Errorf("run %q doesn't exist", runID)))
|
||||
return
|
||||
}
|
||||
|
||||
cgts, err := types.MarshalChangeGroupsUpdateToken(cgt)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue