Sometimes, the best way of handling an error from the FB Graph API is to perform an action based on the error code that they provide (see the FB error docs). Additionally, often an application should take different actions based on the code or subcode.
This PR simply records the code and the subcode (if any) provided by FB, and makes it available in an accessor. I was also working on code to provide the mapping to the Error Recovery Tactics listed on the documentation page, but I quickly realized that not all of the error codes that can be returned from facebook are listed on that page. If you have any ideas on how to handle unknowns, let me know and I'll push up the commit
Sometimes, the best way of handling an error from the FB Graph API is to perform an action based on the error code that they provide (see the FB error docs). Additionally, often an application should take different actions based on the code or subcode.
This PR simply records the code and the subcode (if any) provided by FB, and makes it available in an accessor. I was also working on code to provide the mapping to the Error Recovery Tactics listed on the documentation page, but I quickly realized that not all of the error codes that can be returned from facebook are listed on that page. If you have any ideas on how to handle unknowns, let me know and I'll push up the commit