From 57f8a851eba7085e105e615b2266685344f8f3ea Mon Sep 17 00:00:00 2001 From: Akim Mamedov Date: Mon, 18 Dec 2023 22:36:36 +0700 Subject: [PATCH] JSON stringify errors --- packages/@tests/smoke/web-cra-ts/src/App.tsx | 14 ++++++++------ packages/@tests/smoke/web/public/index.js | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/@tests/smoke/web-cra-ts/src/App.tsx b/packages/@tests/smoke/web-cra-ts/src/App.tsx index 5cb44e9b..9a54468e 100644 --- a/packages/@tests/smoke/web-cra-ts/src/App.tsx +++ b/packages/@tests/smoke/web-cra-ts/src/App.tsx @@ -13,13 +13,15 @@ function App() { }) .catch((err) => { if (err instanceof Error) { - console.log({ - name: err.name, - message: err.message, - stack: err.stack, - }); + console.log( + JSON.stringify({ + name: err.name, + message: err.message, + stack: err.stack, + }), + ); } else { - console.log(err); + console.log(JSON.stringify(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 eed52ea4..00175878 100644 --- a/packages/@tests/smoke/web/public/index.js +++ b/packages/@tests/smoke/web/public/index.js @@ -112,9 +112,9 @@ btn.addEventListener("click", () => { document.getElementById("res-placeholder").appendChild(inner); }).catch(err => { if (err instanceof Error) { - console.log({ name: err.name, message: err.message, stack: err.stack }); + console.log(JSON.stringify({ name: err.name, message: err.message, stack: err.stack })); return; } - console.log(err); + console.log(JSON.stringify(err)); }); });