From be219b29c9006708bb46f9d06f7bc24ec5c24851 Mon Sep 17 00:00:00 2001 From: Brawn Date: Sun, 19 Jan 2025 21:02:49 +0300 Subject: [PATCH] fix: Fix error handling Update index.ts --- packages/hub-web/examples/profile/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hub-web/examples/profile/index.ts b/packages/hub-web/examples/profile/index.ts index 306e2c7b15..aa45242590 100644 --- a/packages/hub-web/examples/profile/index.ts +++ b/packages/hub-web/examples/profile/index.ts @@ -14,7 +14,7 @@ async function profile(fid = 2) { } } catch (e) { // handle errors - console.error("Error getting userdata message: ", e.response.data); + console.error("Error getting userdata message: ", e.response?.data || e.message); } }