extracted http error handling to Web.XING.API from CliDemo