Added bad http response handling