public static Errors forCode(short code) {
        Errors error = CODE_TO_ERROR.get(code);
        if (error != null) {
            return error;
        } else {
            log.warn("Unexpected error code: {}.", code);
            return UNKNOWN_SERVER_ERROR;
        }
    }
Throw the exception if there is one
clients/src/main/java/org/apache/kafka/common/protocol/Errors.java