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 }) } } }