jgorset/facepy — pull request #122 by gerardo-orozco (2014-09-25 05:15:12+00:00)
Title: Support Facebook error messages on HTTP 5XX

While working with the Ads API, I noticed that if Facebook responds with an `HTTP 5XX` status code due to things such as validation errors, invalid actions, etc., the error response most of the times, if not always, contains a JSON object including a description of what is wrong with the request, which is being ignored when a response has a status code of 5XX.

I consider this message is useful to have in the exception being raised for debugging purposes or to communicate the end user why Facebook didn't process a request, assuming the user's input data is invalid.