diff --git a/packages/@tests/smoke/web-cra-ts/src/App.tsx b/packages/@tests/smoke/web-cra-ts/src/App.tsx index 82c6a185..5cb44e9b 100644 --- a/packages/@tests/smoke/web-cra-ts/src/App.tsx +++ b/packages/@tests/smoke/web-cra-ts/src/App.tsx @@ -12,7 +12,16 @@ function App() { setResult(res); }) .catch((err) => { - console.log(err); + if (err instanceof Error) { + console.log({ + name: err.name, + message: err.message, + stack: err.stack, + }); + } else { + console.log(err); + } + setResult({ type: "failure", error: err.toString() }); }); }; diff --git a/packages/@tests/smoke/web/public/index.js b/packages/@tests/smoke/web/public/index.js index 4d6965a7..eed52ea4 100644 --- a/packages/@tests/smoke/web/public/index.js +++ b/packages/@tests/smoke/web/public/index.js @@ -110,5 +110,11 @@ btn.addEventListener("click", () => { inner.id = "res"; inner.innerText = res; document.getElementById("res-placeholder").appendChild(inner); - }).catch(console.log); + }).catch(err => { + if (err instanceof Error) { + console.log({ name: err.name, message: err.message, stack: err.stack }); + return; + } + console.log(err); + }); });