mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Return 500 if trying to run path with non-existing image (#546)
* Return 500 if trying to run path with non-existing image Fixes: #540 * Add failed task run to logs
This commit is contained in:
committed by
GitHub
parent
d17db26c82
commit
e39f70d6cc
@@ -225,6 +225,13 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, foun
|
||||
default:
|
||||
result, err := runner.RunTask(s.tasks, ctx, cfg)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, runnerResponse{
|
||||
RequestID: cfg.ID,
|
||||
Error: &models.ErrorBody{
|
||||
Message: err.Error(),
|
||||
},
|
||||
})
|
||||
log.WithError(err).Error("Failed to run task")
|
||||
break
|
||||
}
|
||||
for k, v := range found.Headers {
|
||||
|
||||
Reference in New Issue
Block a user