on debugging http
throw exception upon http error