Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse invocation errors as strings #607

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ impl Handle<capability::Invocation> for ElixirHandler {
(false, e) => {
// TODO: verify whether we should return none here or use an Err
error!("Elixir callback threw an exception.");
bail!("Host call function failed: {e:?}")
let err_str = String::from_utf8(e.to_vec()).unwrap_or_else(|parse_err| {
format!("failed to parse inv err: {parse_err}")
});
bail!("Host call function failed: {err_str}")
}
}
}
Expand Down