facebook / facebook-ruby-business-sdk

Ruby SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
208 stars 161 forks source link

Add error data field to error response #100

Closed walt1020 closed 3 years ago

walt1020 commented 4 years ago

I am working on some code that uses the [validate_only, include_recommendations, synchronous_ad_review] execution options when creating an ad to check whether or not it will be penalized for having too much image text.

However, when making the API call to create an ad with these execution options, the error response I get back does not include the information required to determine if it's being flagged as having too much text. I submitted the same request in the Graph API explorer and got much of the same information back, in addition to the error_data information which included what I needed, as well as other helpful information.

This PR will hopefully provide more error information to users who would like it. Thanks for the consideration!