Skip to content

Commit e39f70d

Browse files
authored
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
1 parent d17db26 commit e39f70d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

api/server/runner.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, foun
225225
default:
226226
result, err := runner.RunTask(s.tasks, ctx, cfg)
227227
if err != nil {
228+
c.JSON(http.StatusInternalServerError, runnerResponse{
229+
RequestID: cfg.ID,
230+
Error: &models.ErrorBody{
231+
Message: err.Error(),
232+
},
233+
})
234+
log.WithError(err).Error("Failed to run task")
228235
break
229236
}
230237
for k, v := range found.Headers {

0 commit comments

Comments
 (0)