From 64a32004a312cdd11a727081b20eaf49e6a2f779 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 14 Oct 2024 12:28:38 +0200 Subject: [PATCH] switchAway for all server errors --- apps/remix-ide/src/app/providers/abstract-provider.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/providers/abstract-provider.tsx b/apps/remix-ide/src/app/providers/abstract-provider.tsx index e740c6139b..b00efc3d0a 100644 --- a/apps/remix-ide/src/app/providers/abstract-provider.tsx +++ b/apps/remix-ide/src/app/providers/abstract-provider.tsx @@ -126,12 +126,10 @@ export abstract class AbstractProvider extends Plugin implements IProvider { private async sendAsyncInternal(data: JsonDataRequest, resolve: SuccessRequest, reject: RejectRequest): Promise { if (this.provider) { try { - console.log('sendAsyncInternal', data) const result = await this.provider.send(data.method, data.params) resolve({ jsonrpc: '2.0', result, id: data.id }) } catch (error) { - console.log('CATCH', error.message) - if (error && error.message && error.message.includes('net_version') && error.message.includes('SERVER_ERROR')) { + if (error && error.message && error.message.includes('SERVER_ERROR')) { this.switchAway(true) } error.code = -32603