Skip to content

Commit

Permalink
chore: add warning if workflow is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
agparadiso committed Dec 19, 2024
1 parent 0132998 commit 765e570
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/services/workflows/syncer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,14 @@ func (h *eventHandler) workflowDeletedEvent(
}

err := h.orm.DeleteWorkflowSpec(ctx, hex.EncodeToString(payload.WorkflowOwner), payload.WorkflowName)
if err != nil && !errors.Is(err, sql.ErrNoRows) {
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
h.lggr.Warnw("workflow spec not found", "workflowID", hex.EncodeToString(payload.WorkflowID[:]))
return nil
}
return fmt.Errorf("failed to delete workflow spec: %w", err)
}

return nil
}

Expand Down

0 comments on commit 765e570

Please sign in to comment.