Skip to content

fix: throw error instead of silent return in cancelExecution, fixes #11#44

Merged
Dancode-188 merged 1 commit intomainfrom
fix/issue-11-13-cancel-execution
Dec 27, 2025
Merged

fix: throw error instead of silent return in cancelExecution, fixes #11#44
Dancode-188 merged 1 commit intomainfrom
fix/issue-11-13-cancel-execution

Conversation

@Dancode-188
Copy link
Copy Markdown
Owner

Fixes #11

Problem

cancelExecution would silently return when the execution didn't exist or wasn't in running status. No error, no feedback - just nothing. Makes debugging issues nearly impossible.

Changes

Replaced the silent return with proper error throwing:

  • Execution not found: Error: Execution {id} not found
  • Wrong status: Error: Cannot cancel execution with status: {status}

Notes

Issue #13 (persistence) is already handled by the existing db.chainExecutions.update() call - cancellation is being persisted correctly.

The cancelExecution method would silently return when an execution wasn't
found or wasn't in running status, providing no feedback to the caller.

Changed to throw descriptive errors:
- Execution not found: throws with execution ID
- Wrong status: throws with current status

This gives callers proper error handling instead of silent failures.

Note: Cancellation persistence (#13) is already handled by the existing
db.chainExecutions.update() call at lines 324-328.
@Dancode-188
Copy link
Copy Markdown
Owner Author

Straightforward fix. The error messages are clear and will make debugging much easier. Build verified passing.

@Dancode-188 Dancode-188 merged commit 809d05e into main Dec 27, 2025
2 checks passed
@Dancode-188 Dancode-188 deleted the fix/issue-11-13-cancel-execution branch December 28, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: cancelExecution does not throw error for invalid executionId

1 participant