mirror of
https://github.com/openfaas/faas.git
synced 2025-06-26 00:33:25 +00:00
External replica proxy
This commit is contained in:
@ -115,16 +115,16 @@ func MakeAlertHandler(sq ServiceQuery) http.HandlerFunc {
|
||||
errors := handleAlerts(&req, sq)
|
||||
if len(errors) > 0 {
|
||||
log.Println(errors)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
var errorOutput string
|
||||
for d, err := range errors {
|
||||
errorOutput += fmt.Sprintf("[%d] %s\n", d, err)
|
||||
}
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
w.Write([]byte(errorOutput))
|
||||
} else {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user