work around to deal with http error responses