From 2abf306765219eb2cac2ea5ecc96a50a35c4e54c Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Wed, 22 Nov 2023 14:47:31 +0800 Subject: [PATCH] Backend/Ether: retry/catch InternalErr=-32603 code Happened in: https://github.com/aarani/geewallet/actions/runs/6953561790/job/18918892863 --- src/GWallet.Backend/Ether/EtherExceptions.fs | 1 + src/GWallet.Backend/Ether/EtherServer.fs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/GWallet.Backend/Ether/EtherExceptions.fs b/src/GWallet.Backend/Ether/EtherExceptions.fs index 7bb36b17f..a08d73033 100644 --- a/src/GWallet.Backend/Ether/EtherExceptions.fs +++ b/src/GWallet.Backend/Ether/EtherExceptions.fs @@ -32,6 +32,7 @@ type RpcErrorCode = | DailyRequestCountExceededSoRequestRateLimited = -32005 | CannotFulfillRequest = -32046 | ResourceNotFound = -32001 + | InternalError = -32603 type ServerCannotBeResolvedException = inherit CommunicationUnsuccessfulException diff --git a/src/GWallet.Backend/Ether/EtherServer.fs b/src/GWallet.Backend/Ether/EtherServer.fs index 137d97564..7e0e83db8 100644 --- a/src/GWallet.Backend/Ether/EtherServer.fs +++ b/src/GWallet.Backend/Ether/EtherServer.fs @@ -223,6 +223,8 @@ module Server = raise <| ServerRefusedException(exMsg, rpcResponseEx) | h when h = int RpcErrorCode.ResourceNotFound -> raise <| ServerMisconfiguredException(exMsg, rpcResponseEx) + | i when i = int RpcErrorCode.InternalError -> + raise <| ServerFaultException(exMsg, rpcResponseEx) | _ -> raise <| Exception (SPrintF3 "RpcResponseException with RpcError Code <%i> and Message '%s' (%s)"