WIP: Attach the API response to the thrown error
This allows an error handler to access the whole response, e.g. to get the status code or to parse the response body as JSON.
WIP as I need to check the existing error handlers to see if any of them are accessing the current error.response
property.