Indicate HTTP status code by library const (#703)

This commit is contained in:
xiekeyang
2018-05-24 19:10:45 +08:00
committed by Ta-Ching Chen
parent 8984e4916e
commit 940b9adabd
10 changed files with 49 additions and 49 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ func (api *API) StorageServiceProxy(w http.ResponseWriter, r *http.Request) {
if err != nil {
msg := fmt.Sprintf("Error parsing url %v: %v", u, err)
log.Println(msg)
http.Error(w, msg, 500)
http.Error(w, msg, http.StatusInternalServerError)
return
}
director := func(req *http.Request) {
+1 -1
View File
@@ -13,7 +13,7 @@ func (api *API) WorkflowApiserverProxy(w http.ResponseWriter, r *http.Request) {
ssUrl, err := url.Parse(u)
if err != nil {
msg := fmt.Sprintf("Error parsing url %v: %v", u, err)
http.Error(w, msg, 500)
http.Error(w, msg, http.StatusInternalServerError)
return
}