Closed fabio-sassi-spotview closed 2 years ago
Hi @tareqtms
Any news about this pull request? Do you think it would be ok or it need of some refactory?
@fabio-sassi-spotview Sorry, I need to test GraphQL manually as there is no test case made for that yet. Just to make sure it didn't break. I will do it by tomorrow (hopefully).
Hi @tareqtms
Have you any news?
@fabio-sassi-spotview Merged and released. Sorry for the delay and thanks for your patience.
thank you very much @tareqtms
Sometime for temporary issue, shopify http request fail, for example I found in my test logs:
If you try again a moment later, same requests are ok.
This implementation try to mitigate this problem.
I add a configuration parameters
RequestRetryCallback
that allow to define a callback to manage or log the retry. The callback take 3 input parameter: raw curl response, exception object and retry number. If this callback return true (or non null value) another attempt will be performed.By default this callback is not defined and this does not change the original behavior of the library.
For example
This is a modified version of #234 after @tareqtms advice.