Ensures that response errors caused when transforming response data to
JSON are returned correctly