summaryrefslogtreecommitdiff
path: root/runtime/ops
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops')
-rw-r--r--runtime/ops/web_worker.rs1
-rw-r--r--runtime/ops/web_worker/sync_fetch.rs2
-rw-r--r--runtime/ops/worker_host.rs2
3 files changed, 3 insertions, 2 deletions
diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs
index 0ed76ebd5..e28bf2192 100644
--- a/runtime/ops/web_worker.rs
+++ b/runtime/ops/web_worker.rs
@@ -50,6 +50,7 @@ async fn op_worker_recv_message(
.recv(state.clone())
.or_cancel(handle.cancel)
.await?
+ .map_err(|e| e.into())
}
#[op2(fast)]
diff --git a/runtime/ops/web_worker/sync_fetch.rs b/runtime/ops/web_worker/sync_fetch.rs
index cdb151a86..87fc55840 100644
--- a/runtime/ops/web_worker/sync_fetch.rs
+++ b/runtime/ops/web_worker/sync_fetch.rs
@@ -134,7 +134,7 @@ pub fn op_worker_sync_fetch(
let mime_type = mime_type_essence(&blob.media_type);
- let body = blob.read_all().await?;
+ let body = blob.read_all().await;
(Bytes::from(body), Some(mime_type), script)
}
diff --git a/runtime/ops/worker_host.rs b/runtime/ops/worker_host.rs
index 61e5ef3e0..d85541d51 100644
--- a/runtime/ops/worker_host.rs
+++ b/runtime/ops/worker_host.rs
@@ -359,7 +359,7 @@ async fn op_host_recv_message(
}
Ok(ret)
}
- Ok(Err(err)) => Err(err),
+ Ok(Err(err)) => Err(err.into()),
Err(_) => {
// The worker was terminated.
Ok(None)