SpotifyApi.NetCore icon indicating copy to clipboard operation
SpotifyApi.NetCore copied to clipboard

What about throttling ?

Open ahmeetarif opened this issue 4 years ago • 1 comments

Hello, How can I handle throttling ?

ahmeetarif avatar Apr 12 '21 13:04 ahmeetarif

Hi @ahmeetarif, we don't have great support for throttling right now. You could wrap calls using a library like Polly however SpotifyApi.NetCore does not do a great job of passing back retry information to callers in the current version. You would need to check the Error.Message property in the error message to see if it was a throttling error, and if so, back off an retry using Polly.

Can you send me a log message / error message from a throttling error please? And if you can see them, any retry-after headers. I will see if I can incorporate them in the response.

In vNext I will add built-in retry support for throttling.

DanielLarsenNZ avatar Apr 13 '21 09:04 DanielLarsenNZ