Skip to content

Commit

Permalink
change error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren committed Mar 15, 2019
1 parent 645eea1 commit e5b5a1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ func MainHandler(w http.ResponseWriter, r *http.Request, c conf.Configuration, k
},
}).ParseFiles(TEMPLATE_FILE)
if err != nil {
panic(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
err = template.Must(tmpl.Clone()).Execute(w, templateData)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}

Expand Down

0 comments on commit e5b5a1a

Please sign in to comment.