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

Is there any way to access retryCount on the BeforeRequestHook? #1866

Open
1 task done
coleabbeduto-NM opened this issue Sep 9, 2021 · 1 comment
Open
1 task done

Comments

@coleabbeduto-NM
Copy link

What would you like to discuss?

Currently we use the different hooks to log on different events like beforeRetry and afterResponse. But we've come to a point where we would like to add a beforeRequest hook with a logging statement in there. The problem comes in with that if you have two retries on a request, you get a beforeRequest log with every retry along with a beforeRetry log. So you get log spam.

We would like to try to avoid this by looking at the retryCount so that we don't log anything if this is a retry request, but it doesn't seem to be accessible in this hook unlike most of the others. Is there something that I'm missing or will this need to be a feature request?
...

Checklist

  • I have read the documentation.
@szmarczak
Copy link
Collaborator

Related with #559

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