correctly returns http error on connect