Skip to content

Commit

Permalink
Allow 403 for explores (EtherScan / Cloudflare) (#6168)
Browse files Browse the repository at this point in the history
  • Loading branch information
ligi authored Nov 7, 2024
1 parent 197d3e4 commit 3d9cf13
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ fun checkChain(chainFile: File, onlineCheck: Boolean, verbose: Boolean = false)
if (onlineCheck) {
val request = Request.Builder().url(url).build();
val code = okHttpClient.newCall(request).execute().code
if (code / 100 != 2) {
if (code / 100 != 2 && code != 403 ) { // etherscan throws a 403 because of cloudflare - so we need to allow it :cry
throw (CantReachExplorerException(url, code))
}
}
Expand Down

0 comments on commit 3d9cf13

Please sign in to comment.