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

When hitting a 429 error, show more info #120

Open
matthewdarwin opened this issue Feb 5, 2024 · 2 comments
Open

When hitting a 429 error, show more info #120

matthewdarwin opened this issue Feb 5, 2024 · 2 comments

Comments

@matthewdarwin
Copy link

From time to time you will see error like:

retrying request in 10 second(s), at attempt 1, attempts left

Apparently this is a 429 rate exceeded request. A few improvements can be made:

  • print which endpoint is having the problem (especially when multiple endpoints configured)
  • print which URL is having the problem
  • print the HTTP response code to make the message clearer
@chamorin
Copy link
Contributor

chamorin commented Feb 6, 2024

Would a json format be good for that? Something like this:

[2024-02-06T00:41:29Z WARN  thegarii::client] { "endpoint": "https://arweave.net/", "path": "tx/G0-ZqnrrAtAZOoqzrKk5atyNIpms3g57CBjumxThtPE", "status": "429 Too Many Requests", "retry_in": 10, "attempts": 1, "attempts_left": 99 }

@matthewdarwin
Copy link
Author

looks much better

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

No branches or pull requests

2 participants