remove assumption that error responses are all json

e.g. 404 is not json