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:
Seif Lotfy سيف لطفي
2017-02-28 19:14:51 -06:00
committed by GitHub
parent d17db26c82
commit e39f70d6cc

View File

@@ -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 {