Closed iamricks closed 5 years ago
When handling errors with Facebook, best practice is to use the error codes since the descriptions can change.
Facebook lays out the error codes here to make it easier to handle: https://developers.facebook.com/docs/marketing-api/error-reference/
It looks like the only things being returned are fb_message, error_user_title and fbtrace_id according to this: https://github.com/facebook/facebook-ruby-business-sdk/blob/55700ad0afee5fa4a8f521ad4615fcff54d2d6a9/lib/facebook_ads/errors.rb
fb_message
error_user_title
fbtrace_id
It should return an error code for the message being returned
Is there any way to get this error code that belongs to the message?
I didn't review the code thoroughly enough.
Looks like you can just do e.code on the error and receive the code for the exception that is raised.
e.code
What's the issue?
When handling errors with Facebook, best practice is to use the error codes since the descriptions can change.
Facebook lays out the error codes here to make it easier to handle: https://developers.facebook.com/docs/marketing-api/error-reference/
Observed Results:
It looks like the only things being returned are
fb_message
,error_user_title
andfbtrace_id
according to this: https://github.com/facebook/facebook-ruby-business-sdk/blob/55700ad0afee5fa4a8f521ad4615fcff54d2d6a9/lib/facebook_ads/errors.rbExpected Results:
It should return an error code for the message being returned
Question:
Is there any way to get this error code that belongs to the message?