sindresorhus / got

🌐 Human-friendly and powerful HTTP request library for Node.js
MIT License
14.18k stars 936 forks source link

afterResponse hook is not called after a retryWithMergedOptions() #2347

Open Mr0nline opened 4 months ago

Mr0nline commented 4 months ago

I have a very similar problem as #1506 , I am using Shopify Node SDK by Monei and I am facing an issue regarding request retries, So basically in production, Some requests are waiting for 30 minutes before hitting the Shopify due to rate limit and I could solve the problem if I could call afterResponse hook from which I could just throw an error when I hit rate limit instead of retrying it but the last known details from that issue is

You can add a new one via the updated options.

So now I want to see what I need to do to get around with the situation? I already tried calling retryWithMergedOptions with different values but I never got to call afterResponse!

Checklist

work-with-akash commented 4 months ago

+1

keirdavie commented 4 months ago

+1

Mr0nline commented 3 months ago

Bumping this up!