private static DnsExceptionTypes determineDnsExceptionTag(Throwable cause, @Nullable String message) {
        if (cause instanceof DnsTimeoutException) {
            return DnsExceptionTypes.SERVER_TIMEOUT;
        } else if (cause instanceof DnsNameResolverTimeoutException) {
            return DnsExceptionTypes.RESOLVER_TIMEOUT;
        }

        if (message == null) {
            return DnsExceptionTypes.OTHERS;
        } else if (message.contains(NXDOMAIN_EXCEPTION_MESSAGE)) {
            return DnsExceptionTypes.NX_DOMAIN;
        } else if (message.contains(CNAME_EXCEPTION_MESSAGE)) {
            return DnsExceptionTypes.CNAME_NOT_FOUND;
        } else if (message.contains(NO_MATCHING_EXCEPTION_MESSAGE)) {
            return DnsExceptionTypes.NO_MATCHING_RECORD;
        } else if (message.contains(UNRECOGNIZED_TYPE_EXCEPTION_MESSAGE)) {
            return DnsExceptionTypes.UNRECOGNIZED_TYPE;
        }
        return DnsExceptionTypes.OTHERS;
    }
Returns the IP address of the given {@link InetSocketAddress}, stripping the scope ID if necessary.
core/src/main/java/com/linecorp/armeria/client/DefaultDnsQueryLifecycleObserver.java