From 1e25e5bbac67d5f15f7d43b8c9f5371425eebe8b Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 24 Mar 2023 14:07:06 +0530 Subject: [PATCH] show relevant error message --- apps/remix-ide/src/app/providers/injected-provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/providers/injected-provider.tsx b/apps/remix-ide/src/app/providers/injected-provider.tsx index 4de903c0c8..9a1f915128 100644 --- a/apps/remix-ide/src/app/providers/injected-provider.tsx +++ b/apps/remix-ide/src/app/providers/injected-provider.tsx @@ -99,7 +99,7 @@ export abstract class InjectedProvider extends Plugin implements IProvider { resolve({ jsonrpc: '2.0', error: 'no return data provided', id: data.id }) } } catch (error) { - resolve({ jsonrpc: '2.0', error: error.message, id: data.id }) + resolve({ jsonrpc: '2.0', error: error.data && error.data.message ? error.data.message : error.message, id: data.id }) } } }