Skip to content

[Bug]:ChainService stops execution even when continueOnError = true #1

@SSJane

Description

@SSJane

Bug Description

When executing a chain, if a step fails but has continueOnError = true, the ChainService unexpectedly stops executing remaining steps and marks them as "skipped".
Expected behavior is to continue executing subsequent steps.

Steps to Reproduce

1.Create a chain with two steps.

2.Step 1: Simulate failure (mock httpClient to throw an error).

3.Step 1: Set continueOnError = true.

4.Step 2: Mock successful execution.

5.Run chainService.executeChain().

6.Observe the execution result.

Expected Behavior

Step 1: "failed"

Step 2: "success"

Actual Behavior

Step 1: "failed"

Step 2: "skipped"

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

AssertionError: expected 'skipped' to be 'success'

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