Send back an http error code in case of error, so Docker is clear something went wrong

This commit is contained in:
Bryan Boreham committed 2016-01-20 15:36:42 +00:00
1 parent a238130613
commit 6035b54277
1 file changed
+1
+1
View File
@@ -265,6 +265,7 @@ func sendError(w http.ResponseWriter, msg string, code int) {
}
func errorResponse(w http.ResponseWriter, fmtString string, item ...interface{}) {
w.WriteHeader(http.StatusInternalServerError)
json.NewEncoder(w).Encode(map[string]string{
"Err": fmt.Sprintf(fmtString, item...),
})