| Index: go/src/infra/tricium/service/workflow-listener/handlers.go
|
| diff --git a/go/src/infra/tricium/service/workflow-listener/handlers.go b/go/src/infra/tricium/service/workflow-listener/handlers.go
|
| index cd676c917b838c147b11477125be0c36a52ddb65..923d7e0477559ea06bc399c989af8d7b885a7db2 100644
|
| --- a/go/src/infra/tricium/service/workflow-listener/handlers.go
|
| +++ b/go/src/infra/tricium/service/workflow-listener/handlers.go
|
| @@ -25,7 +25,10 @@ func statusPageHandler(w http.ResponseWriter, r *http.Request) {
|
| data := map[string]interface{}{
|
| "Msg": "Status of the Workflow Listener ...",
|
| }
|
| - basePage.Execute(w, data)
|
| + if e := basePage.Execute(w, data); e != nil {
|
| + http.Error(w, e.Error(), http.StatusInternalServerError)
|
| + return
|
| + }
|
| }
|
|
|
| func queueHandler(w http.ResponseWriter, r *http.Request) {
|
| @@ -35,8 +38,8 @@ func queueHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
| // Enqueue gerrit reporter task.
|
| t := taskqueue.NewPOSTTask("/gerrit-reporter/queue-handler", map[string][]string{"name": {"Workflow Event"}})
|
| - if _, err := taskqueue.Add(ctx, t, "gerrit-reporter-queue"); err != nil {
|
| - http.Error(w, err.Error(), http.StatusInternalServerError)
|
| + if _, e := taskqueue.Add(ctx, t, "gerrit-reporter-queue"); e != nil {
|
| + http.Error(w, e.Error(), http.StatusInternalServerError)
|
| return
|
| }
|
| }
|
|
|