public static String getErrorUrl()

in dubbo-error-code-inspector/src/main/java/org/apache/dubbo/errorcode/util/ErrorUrlUtils.java [32:52]


    public static String getErrorUrl(String code) {

        String trimmedString = code.trim();

        if (!ErrorCodeExtractor.ERROR_CODE_PATTERN.matcher(trimmedString).matches()) {
            return "";
        }

        String[] segments = trimmedString.split("-");

        int[] errorCodeSegments = new int[2];

        try {
            errorCodeSegments[0] = Integer.parseInt(segments[0]);
            errorCodeSegments[1] = Integer.parseInt(segments[1]);
        } catch (NumberFormatException numberFormatException) {
            return "";
        }

        return String.format(INSTRUCTIONS_URL, errorCodeSegments[0], errorCodeSegments[1]);
    }