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?