throws an exception when not 200, including error message issued from api server.