Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add a retry option for ipfs request #16

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Conversation

Maikol
Copy link
Member

@Maikol Maikol commented Apr 16, 2024

No description provided.

@Maikol Maikol requested review from pcarranzav, tmigone and LNSD April 16, 2024 19:00
Copy link

@LNSD LNSD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

As an improvement suggestion (which might not apply to this case):

The ips.call(...) may fail for different reasons. Some of the errors reported may be unrecoverable (e.g., invalid host URL, invalid CID, remote host not found, etc.). In those cases, I would return from the retry loop as soon as that type of error is reported, as it is useless to retry a request that won't ever succeed.

@Maikol
Copy link
Member Author

Maikol commented Apr 22, 2024

@LNSD Thanks for the suggestion. In a future version we can look at error types and what to retry. Here we asume all errors are recoverable else the oracle will consistently fail.

@Maikol Maikol merged commit 97459ba into main Apr 22, 2024
4 checks passed
@Maikol Maikol deleted the mde/retry-failed-request branch April 22, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants