Skip to content

Commit 60064fd

Browse files
authored
Merge pull request #8 from Emmo00/feat/sync
fix: handle service overloaded error
2 parents e5ac93b + e088156 commit 60064fd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/helpers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export async function makeRequestToArweaveNetwork(
171171
},
172172
})
173173

174-
if (response.status === 429 || response.status === 503) {
174+
if (response.status === 429 || response.status === 503 || response.status === 529 || response.status === 572) {
175175
console.warn(
176176
`Request to ${url} failed with status ${response.status}. retrying...`
177177
)
@@ -188,8 +188,6 @@ export async function makeRequestToArweaveNetwork(
188188
throw new Error(`Max attempts reached for ${url}`)
189189
}
190190

191-
console.log(`"Success" Response from ${url}:`, response.status)
192-
193191
return response
194192
} catch (error: any) {
195193
const isTimeout =

0 commit comments

Comments
 (0)