feat: Implement retry limit configuration#1178
Conversation
|
Thanks for your PR @FoxxMD, does the retry for POSTs have any sensible effect? |
|
I haven't really needed to use POSTs, and I know they would be much less frequent than GETs, but I think it still applies, generally, to the need for retries. Sometimes musicbrainz just doesn't respond to a request even if a subsequent request is just fine. And if it's specifically an issue with rate limiting from MB then a user who is using musicbrainz-api and needs that POST to succeed would wan to configure it to a higher limit than just 1. Basically, retry until it succeeds. Which could be done outside of this library but since the retry logic is already here and configuration is already available for GET... |
|
I am not fan on speculating the POST behaves the same way, I prefer to keep the retry just on the GET if are not sure if it gives the intended effect. |
Allow user config option to pass retryLimit for GET requests
|
Alright that's fair. I've updated it to only pass retry limit for |
This configuration option allows users to set the number of retries made for GET and POST requests, rather than it being hardcoded to 10 and 1, respectively.