Skip to content

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

@SSJane

Description

@SSJane

Bug Description

When calling chainService.cancelExecution with an invalid executionId, the function currently returns undefined instead of rejecting the promise. This causes test cases that expect an error to fail

Steps to Reproduce

1.Call cancelExecution with a non-existing execution ID:

await chainService.cancelExecution("invalid-id");

2.Observe that the promise resolves instead of rejecting.

Expected Behavior

The function should throw an error:

Error: Execution not found

Actual Behavior

The function silently returns undefined.

Environment

Vitest/ui v4.0.5
Vitest/coverage-v8 v4.0.4

Node.js v22.2.0

OS: Windows 11

File: src/lib/chain-service.ts

Test file: chain-service.test.ts

Screenshots

Image

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions