eclipse-vertx/vert.x · error · io.netty.handler.codec.DecoderException

DNS record decoding error occurred: Unsupported resource rec

Error message

DNS record decoding error occurred: Unsupported resource record type [id: ${type}].

What it means

RecordDecoder.decode dispatch failure: the DNS resource record's type has no registered decoder function in the decoders map. The message is a generic sentinel naming the unsupported DnsRecordType id; only types with registered decoders (A, AAAA, MX, TXT, SRV, NS, CNAME, PTR, SOA, ...) can be decoded.

Source

Thrown at vertx-core/src/main/java/io/vertx/core/dns/impl/RecordDecoder.java:245

        decoders.put(DnsRecordType.SRV, RecordDecoder.SRV);
        decoders.put(DnsRecordType.NS, RecordDecoder.DOMAIN);
        decoders.put(DnsRecordType.CNAME, RecordDecoder.DOMAIN);
        decoders.put(DnsRecordType.PTR, RecordDecoder.DOMAIN);
        decoders.put(DnsRecordType.SOA, RecordDecoder.SOA);
    }

    /**
     * Decodes a resource record and returns the result.
     *
     * @param record
     * @return the decoded resource record
     */
    @SuppressWarnings("unchecked")
    static <T> T decode(DnsRecord record) {
        DnsRecordType type = record.type();
        Function<DnsRecord, ?> decoder = decoders.get(type);
        if (decoder == null) {
            throw new DecoderException("DNS record decoding error occurred: Unsupported resource record type [id: " + type + "].");
        }
        T result = null;
        try {
            result = (T) decoder.apply(record);
        } catch (Exception e) {
          log.error(e.getMessage(), e.getCause());
        }
        return result;
    }
}

View on GitHub (pinned to fb308bd8c3)

Solutions

  1. Handle the raw record (DnsRawRecord) directly instead of requesting a decoded type
  2. Filter responses to record types Vert.x knows how to decode
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/dns/impl/RecordDecoder.java:245 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06). Data as JSON: /api/errors/d67ac64d74390420. Report an issue: GitHub.