mirror of
https://github.com/clearlinux/libnetwork.git
synced 2026-08-26 18:17:24 +00:00
Merge pull request #487 from aboch/tmakita
Don't discard error message on sending response
This commit is contained in:
@@ -168,6 +168,10 @@ func makeHandler(ctrl libnetwork.NetworkController, fct processor) http.HandlerF
|
||||
}
|
||||
|
||||
res, rsp := fct(ctrl, mux.Vars(req), body)
|
||||
if !rsp.isOK() {
|
||||
http.Error(w, rsp.Status, rsp.StatusCode)
|
||||
return
|
||||
}
|
||||
if res != nil {
|
||||
writeJSON(w, rsp.StatusCode, res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user