facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.28k stars 631 forks source link

Add failed requests to returned batch instance #539

Closed mschmo closed 1 year ago

mschmo commented 5 years ago

Correct me if I'm wrong, but I believe this description "If some of the calls have failed, returns a new FacebookAdsApiBatch object with those calls" means that if some of the batch requests fail the execute method should return a new FacebookAdsApiBatch with the failed calls.

At the moment the only requests that are retried are ones that returned an empty response body.

mschmo commented 5 years ago

This fix would only retry in cases when there is a failure callback defined for the request index. Perhaps I should update that so that the request is added to the retry list regardless of whether there was a failure callback defined for that index. What are the thoughts of the community? Ok updated, as it just makes way more sense.