-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call to Ads API doesn't throw error on failure. #675
Comments
We've experienced the exact same issue on occasion as the status code isn't being acted on, even 5xx codes. Think the simplest and cleanest solution might be to implement a proper Retry strategy directly at the low-level API request call being made: facebook-python-business-sdk/facebook_business/api.py Lines 301 to 317 in 0a8f347
Potential Fix
Happy to raise a PR if useful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying to gather all adcreatives from a customer ad account I managed to trigger an unexpected error in the Ads API. The library handles this response incorrectly by not raising an error even though the response status is 400.
Details
is_success
method in thefacebook_business.api
module fails to identify this response as a failure and returnsTrue
.Code
The code provided encounters this issue when accessing the
/act_<account_id>/adcreatives
endpoint. Here's a breakdown of what the code does:This approach ensures that the full data for a single edge is retrieved.
The text was updated successfully, but these errors were encountered: