Skip to content

Commit

Permalink
v10.18.16: add another error code that initiates provider rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Sep 10, 2024
1 parent 0296c2b commit 6301715
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider {
if(response.ok) {
response.json().then((parsedJson)=>{
if(parsedJson.find((entry)=>{
return _optionalChain$2([entry, 'optionalAccess', _ => _.error]) && [-32062].includes(_optionalChain$2([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
return _optionalChain$2([entry, 'optionalAccess', _ => _.error]) && [-32062,-32016].includes(_optionalChain$2([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
})) {
if(attempt < MAX_RETRY) {
reject('Error in batch found!');
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider {
if(response.ok) {
response.json().then((parsedJson)=>{
if(parsedJson.find((entry)=>{
return _optionalChain$5([entry, 'optionalAccess', _ => _.error]) && [-32062].includes(_optionalChain$5([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
return _optionalChain$5([entry, 'optionalAccess', _ => _.error]) && [-32062,-32016].includes(_optionalChain$5([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
})) {
if(attempt < MAX_RETRY$1) {
reject('Error in batch found!');
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
if(response.ok) {
response.json().then((parsedJson)=>{
if(parsedJson.find((entry)=>{
return _optionalChain$2([entry, 'optionalAccess', _ => _.error]) && [-32062].includes(_optionalChain$2([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
return _optionalChain$2([entry, 'optionalAccess', _ => _.error]) && [-32062,-32016].includes(_optionalChain$2([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
})) {
if(attempt < MAX_RETRY) {
reject('Error in batch found!');
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
if(response.ok) {
response.json().then((parsedJson)=>{
if(parsedJson.find((entry)=>{
return _optionalChain$5([entry, 'optionalAccess', _ => _.error]) && [-32062].includes(_optionalChain$5([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
return _optionalChain$5([entry, 'optionalAccess', _ => _.error]) && [-32062,-32016].includes(_optionalChain$5([entry, 'optionalAccess', _2 => _2.error, 'optionalAccess', _3 => _3.code]))
})) {
if(attempt < MAX_RETRY$1) {
reject('Error in batch found!');
Expand Down
2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-client-evm",
"moduleName": "Web3Client",
"version": "10.18.15",
"version": "10.18.16",
"description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-client",
"moduleName": "Web3Client",
"version": "10.18.15",
"version": "10.18.16",
"description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-client-solana",
"moduleName": "Web3Client",
"version": "10.18.15",
"version": "10.18.16",
"description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand Down
2 changes: 1 addition & 1 deletion src/clients/ethers/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider {
if(response.ok) {
response.json().then((parsedJson)=>{
if(parsedJson.find((entry)=>{
return entry?.error && [-32062].includes(entry?.error?.code)
return entry?.error && [-32062,-32016].includes(entry?.error?.code)
})) {
if(attempt < MAX_RETRY) {
reject('Error in batch found!')
Expand Down

0 comments on commit 6301715

Please sign in to comment.