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?
Pass error+body when json requests fail parsing
emitting an error here will throw if unhandled which is a breaking change :(