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:
Richard Gee
2018-09-22 18:27:30 +01:00
committed by Alex Ellis
parent df6f4c49f2
commit e33061702a

View File

@ -42,7 +42,7 @@ func MakeScalingHandler(next http.HandlerFunc, upstream http.HandlerFunc, config
errStr = fmt.Sprintf("error finding function %s: %s", functionName, err.Error())
log.Printf(errStr)
w.WriteHeader(http.StatusInternalServerError)
w.WriteHeader(http.StatusNotFound)
w.Write([]byte(errStr))
return
}