Commit 413fa07
committed
fix(cli): surface uncaught exception as user error (FAILED) not system failure
Following on from the prior commit that wired UNCAUGHT_EXCEPTION to fail
the attempt: the parseExecuteError branch returned an INTERNAL_ERROR with
code TASK_EXECUTION_FAILED, which made the run show as "System failure" in
the dashboard. The exception was raised by user code (or a dependency the
user controls — e.g. an EventEmitter "error" event with no listener), so
it should surface as a regular task failure ("Failed" status), not as a
platform fault.
Widen parseExecuteError's return to TaskRunError and have the
UncaughtExceptionError branch return a BUILT_IN_ERROR carrying the
original error name, message, and stack. This routes through the same
finalization path as a thrown user error: status=FAILED, normal retry
policy, catchError / handleError hooks fire as expected.
Both call sites (managed/execution.ts, dev-run-controller.ts) already pass
the result into TaskRunFailedExecutionResult.error, which accepts the full
TaskRunError union — no caller-side changes needed.1 parent ae48697 commit 413fa07
3 files changed
Lines changed: 26 additions & 19 deletions
File tree
- .changeset
- packages/cli-v3/src/executions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | | - | |
| 144 | + | |
143 | 145 | | |
144 | | - | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | | - | |
151 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
558 | | - | |
| 559 | + | |
559 | 560 | | |
560 | 561 | | |
561 | 562 | | |
| |||
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
593 | 599 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
598 | 604 | | |
599 | 605 | | |
600 | 606 | | |
| |||
0 commit comments