crytic-compile icon indicating copy to clipboard operation
crytic-compile copied to clipboard

Parse etherscan response code to improve error message displayed to user

Open 0xalpharush opened this issue 3 years ago • 0 comments

When Etherscan rate-limits crytic-compile the following message is displayed.

ERROR:CryticCompile:Contract has no public source code: https://api-rinkeby.etherscan.io/api?module=contract&action=getsourcecode&address=0x85E2B172e94Ed1d23D3bc078F327b44736887Db9

Etherscan returns a 200 HTTP with the following json response:

{"status":"0","message":"NOTOK","result":"Max rate limit reached, please use API Key for higher rate limit"}

I've asked if they can return a 429 so we don't have to parse the response body, and I'll implement accordingly.

0xalpharush avatar Dec 27 '21 02:12 0xalpharush