Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Use an external package for retry logic in source-fetcher #4231

Closed
haltman-at opened this issue Aug 6, 2021 · 1 comment
Closed

Use an external package for retry logic in source-fetcher #4231

haltman-at opened this issue Aug 6, 2021 · 1 comment

Comments

@haltman-at
Copy link
Contributor

haltman-at commented Aug 6, 2021

Issue

The source-fetcher package currently implements its own retry logic. It would be better to rely on an external package for this. @gnidan recently started using the axios-retry package in his compiler supplier refactor; we could use that.

Environment

  • Truffle version (truffle version): 5.4.3
@haltman-at
Copy link
Contributor Author

Hm so unfortunately, axios-retry won't work for interfacing with Etherscan. (We can use it for Sourcify! But not Etherscan.) The problem is that axios-retry doesn't allow retrying on a 200 OK response, but Etherscan often indicates errors by sending a 200 OK and then indicating the error in the body. So, that won't work here. (I've filed an issue with them, FWIW.)

@haltman-at haltman-at changed the title Internal issue: Use an external package for retry logic in source-fetcher Use an external package for retry logic in source-fetcher Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant