mikeal/request — pull request #762 by johan (2014-01-10 17:21:42+00:00)
Title: Pass error+body when json requests fail parsing

To safely use json requests, I need to be able to trust that error handling of unexpected non-JSON responses works. This passes back the JSON parse error as a request failure, attatching the non-json to a data attribute of the error object.

Points to consider: should it substitute its own error message with a human-readable one mentioning the url, like a few of the others? Attach the url just as it now does the body? Fine as suggested?