mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #487 from aboch/tmakita
Don't discard error message on sending response
This commit is contained in:
commit
5d8db5cec2
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue