throwing exception on http code different than 200