Skip to content

Commit 77b03ed

Browse files
fix(bindgen): more direct task failure
1 parent 2c6ae81 commit 77b03ed

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

crates/js-component-bindgen/src/function_bindgen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ impl Bindgen for FunctionBindgen<'_> {
15091509
"",
15101510
Intrinsic::WithGlobalCurrentTaskMetaFn.name(),
15111511
r#"
1512-
task.reject(err);
1512+
task.setErrored(err);
15131513
task.exit();
15141514
throw err;
15151515
"#,

crates/js-component-bindgen/src/intrinsics/p3/async_task.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,8 +1306,7 @@ impl AsyncTaskIntrinsic {
13061306
this.#state = {task_class}.State.PENDING_CANCEL;
13071307
const cancelled = this.deliverPendingCancel({{ cancellable: true }});
13081308
1309-
// TODO: do cleanup here to reset the machinery so we can run again?
1310-
1309+
// TODO: do cleanup here to reset the machinery so we can run again?
13111310
13121311
this.cancel({{ error: taskErr }});
13131312
}}

0 commit comments

Comments
 (0)