package cn.com.poc.thirdparty.resource.baidu.utils;


import cn.com.poc.thirdparty.resource.baidu.constants.BaiduApiErrorEnum;

/**
 * @author alex.yao
 * @date 2023/3/7
 **/
public class BaiduUtils {

    public static String getErrorMsgByErrorCode(Integer errorCode) {
        for (BaiduApiErrorEnum baiduApiError : BaiduApiErrorEnum.values()) {
            if (baiduApiError.getErrorCode().equals(errorCode)) {
                return baiduApiError.getErrorMessage();
            }
        }
        return "Invocation error";
    }
}
