From 16b177aaf6dc2ded647e7f5a9b5d71fdfa51a2e0 Mon Sep 17 00:00:00 2001 From: Joe Huang Date: Mon, 12 Aug 2024 14:26:02 -0500 Subject: [PATCH 1/3] add error handling for service unavailable for arbitrum --- core/chains/evm/client/errors.go | 2 +- core/chains/evm/client/errors_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index da122514743..4c4e0c0b793 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -158,7 +158,7 @@ var arbitrum = ClientErrors{ Fatal: arbitrumFatal, L2FeeTooLow: regexp.MustCompile(`(: |^)max fee per gas less than block base fee(:|$)`), L2Full: regexp.MustCompile(`(: |^)(queue full|sequencer pending tx pool full, please try again)(:|$)`), - ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$`), + ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$|network is unreachable|observed invariant violation on SendTransaction`), } var celo = ClientErrors{ diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index 72fa1347ec0..ab081a2bc4d 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -229,6 +229,8 @@ func Test_Eth_Errors(t *testing.T) { tests := []errorCase{ {"call failed: 503 Service Unavailable: \r\n503 Service Temporarily Unavailable\r\n\r\n

503 Service Temporarily Unavailable

\r\n\r\n\r\n", true, "Nethermind"}, {"call failed: 502 Bad Gateway: \r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n
", true, "Arbitrum"}, + {"observed invariant violation on SendTransaction", true, "Arbitrum"}, + {"network is unreachable", true, "Arbitrum"}, {"client error service unavailable", true, "tomlConfig"}, } for _, test := range tests { From f385e2e0c247153b826ec543f8cba48914ff0d16 Mon Sep 17 00:00:00 2001 From: Joe Huang Date: Mon, 12 Aug 2024 14:27:28 -0500 Subject: [PATCH 2/3] add changeset --- .changeset/calm-badgers-jump.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/calm-badgers-jump.md diff --git a/.changeset/calm-badgers-jump.md b/.changeset/calm-badgers-jump.md new file mode 100644 index 00000000000..76f6e5d3121 --- /dev/null +++ b/.changeset/calm-badgers-jump.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +add error handling when arbitrum sequencer is not accessible #added From 021d4406b7e14af5885b1c0fb7f4fb815b26f23d Mon Sep 17 00:00:00 2001 From: Joe Huang Date: Tue, 13 Aug 2024 09:26:13 -0500 Subject: [PATCH 3/3] update error message --- core/chains/evm/client/errors.go | 2 +- core/chains/evm/client/errors_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index 4c4e0c0b793..b5e45672976 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -158,7 +158,7 @@ var arbitrum = ClientErrors{ Fatal: arbitrumFatal, L2FeeTooLow: regexp.MustCompile(`(: |^)max fee per gas less than block base fee(:|$)`), L2Full: regexp.MustCompile(`(: |^)(queue full|sequencer pending tx pool full, please try again)(:|$)`), - ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$|network is unreachable|observed invariant violation on SendTransaction`), + ServiceUnavailable: regexp.MustCompile(`(: |^)502 Bad Gateway: [\s\S]*$|network is unreachable|i/o timeout`), } var celo = ClientErrors{ diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index ab081a2bc4d..c455f4ba252 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -229,7 +229,7 @@ func Test_Eth_Errors(t *testing.T) { tests := []errorCase{ {"call failed: 503 Service Unavailable: \r\n503 Service Temporarily Unavailable\r\n\r\n

503 Service Temporarily Unavailable

\r\n\r\n\r\n", true, "Nethermind"}, {"call failed: 502 Bad Gateway: \r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n
", true, "Arbitrum"}, - {"observed invariant violation on SendTransaction", true, "Arbitrum"}, + {"i/o timeout", true, "Arbitrum"}, {"network is unreachable", true, "Arbitrum"}, {"client error service unavailable", true, "tomlConfig"}, }