mirror of
https://github.com/openfaas/faas.git
synced 2025-06-16 12:16:47 +00:00
Return error when ServiceCreate fails in
gateway/handler/createhandler.go Signed-off-by: Eric Stoekl <ems5311@gmail.com>
This commit is contained in:
parent
efe72f8479
commit
1622fadd9c
@ -55,6 +55,9 @@ func MakeNewFunctionHandler(metricsOptions metrics.MetricOptions, c *client.Clie
|
||||
response, err := c.ServiceCreate(context.Background(), spec, options)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
w.Write([]byte("Deployment error: " + err.Error()))
|
||||
return
|
||||
}
|
||||
log.Println(response.ID, response.Warnings)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user