From 456ac8221043b9b35675a413e81b7448599d678c Mon Sep 17 00:00:00 2001 From: mouseless <97399882+mouseless-eth@users.noreply.github.com> Date: Wed, 4 Dec 2024 23:02:00 +0000 Subject: [PATCH] add try/catch around getGasPrice --- src/executor/executor.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/executor/executor.ts b/src/executor/executor.ts index e576043a..e50ab690 100644 --- a/src/executor/executor.ts +++ b/src/executor/executor.ts @@ -153,8 +153,14 @@ export class Executor { ): Promise { const newRequest = { ...transactionInfo.transactionRequest } - const gasPriceParameters = - await this.gasPriceManager.getNetworkGasPrice() + let gasPriceParameters + try { + gasPriceParameters = await this.gasPriceManager.getNetworkGasPrice() + } catch (err) { + this.logger.error({ error: err }, "Failed to get network gas price") + this.markWalletProcessed(transactionInfo.executor) + return { status: "failed" } + } newRequest.maxFeePerGas = maxBigInt( gasPriceParameters.maxFeePerGas,