Send back an http error code with any plugin errors.

This commit is contained in:
Bryan Boreham committed 2016-01-27 14:53:26 +00:00
1 parent 610a90c727
commit 482045aed8
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...),
})