Skip to content

Commit 96dd47a

Browse files
simongdaviesCopilot
andcommitted
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
1 parent 4b7e31d commit 96dd47a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/hyperlight-js/src/sandbox/proto_js_sandbox.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,16 @@ impl ProtoJSSandbox {
149149
let module = host_modules
150150
.get(&module_name)
151151
.ok_or_else(|| new_error!("Host module '{}' not found", module_name))?;
152-
module.call(&func_name, args_json, Some(binaries))
152+
module
153+
.call(&func_name, args_json, Some(binaries))
154+
.map_err(|e| {
155+
new_error!(
156+
"Error calling host function '{}' in module '{}': {}",
157+
func_name,
158+
module_name,
159+
e
160+
)
161+
})
153162
},
154163
)?;
155164

0 commit comments

Comments
 (0)