public static Message doAndResponse(TryOperation tryOperation, String method, String failMessage) {
        try {
            Message message = tryOperation.operateAndGetMessage();
            return setMethod(message, method);
        } catch (WarnException e) {
            LOG.error("api error, method: " + method, e);
            return setMethod(Message.warn(e.getMessage()), method);
        } catch (AssertException | ApiExecuteException | ApiServiceQueryException e) {
            LOG.error("api error, method: " + method, e);
            return setMethod(Message.error(e.getMessage()), method);
        } catch (Exception e) {
            LOG.error("api error, method: " + method, e);
            return Message.error(ExceptionUtils.getRootCauseMessage(e));
        }
    }
@param tryOperation operate function
@param failMessage  message
dss-apps/dss-apiservice-server/src/main/java/com/webank/wedatasphere/dss/apiservice/core/util/ApiUtils.java