diff --git a/CHANGELOG.md b/CHANGELOG.md index e400e2dd8..222e37460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C ## **Unreleased** +### Fixed +- [#2829](https://github.com/wasmerio/wasmer/pull/2829) Improve error message oriented from JS object. + ## 2.2.1 - 2022/03/15 ### Fixed diff --git a/lib/api/src/js/trap.rs b/lib/api/src/js/trap.rs index 5bcde356c..88a8d6d09 100644 --- a/lib/api/src/js/trap.rs +++ b/lib/api/src/js/trap.rs @@ -43,7 +43,7 @@ impl fmt::Display for RuntimeErrorSource { match self { Self::Generic(s) => write!(f, "{}", s), Self::User(s) => write!(f, "{}", s), - Self::Js(s) => write!(f, "{}", s.as_string().unwrap_or("".to_string())), + Self::Js(s) => write!(f, "{:?}", s), } } }