mirror of
https://github.com/openfaas/faas.git
synced 2025-06-27 09:13:24 +00:00
Change the http status code on unfound function error to 404
Signed-off-by: Richard Gee <richard@technologee.co.uk>
This commit is contained in:
@ -42,7 +42,7 @@ func MakeScalingHandler(next http.HandlerFunc, upstream http.HandlerFunc, config
|
|||||||
errStr = fmt.Sprintf("error finding function %s: %s", functionName, err.Error())
|
errStr = fmt.Sprintf("error finding function %s: %s", functionName, err.Error())
|
||||||
|
|
||||||
log.Printf(errStr)
|
log.Printf(errStr)
|
||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
w.Write([]byte(errStr))
|
w.Write([]byte(errStr))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user