{"record":{"id":"f264caff303be36b","repo":"elastic/elasticsearch","slug":"field-must-not-be-null-name","errorCode":null,"errorMessage":"[field] must not be null: [{name}]","messagePattern":"\\[field\\] must not be null: \\[(.+?)\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/ArrayValuesSourceAggregationBuilder.java","lineNumber":130,"sourceCode":"        out.writeGenericValue(fields);\n        out.writeOptionalWriteable(userValueTypeHint);\n        out.writeOptionalString(format);\n        out.writeGenericMap(missingMap);\n        innerWriteTo(out);\n    }\n\n    /**\n     * Write subclass' state to the stream\n     */\n    protected abstract void innerWriteTo(StreamOutput out) throws IOException;\n\n    /**\n     * Sets the field to use for this aggregation.\n     */\n    @SuppressWarnings(\"unchecked\")\n    public AB fields(List<String> fieldsArg) {\n        if (fieldsArg == null) {\n            throw new IllegalArgumentException(\"[field] must not be null: [\" + name + \"]\");\n        }\n        this.fields = fieldsArg;\n        return (AB) this;\n    }\n\n    /**\n     * Gets the field to use for this aggregation.\n     */\n    public List<String> fields() {\n        return fields;\n    }\n\n    /**\n     * Sets the format to use for the output of the aggregation.\n     */\n    @SuppressWarnings(\"unchecked\")\n    public AB format(String formatArg) {\n        if (formatArg == null) {","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/ArrayValuesSourceAggregationBuilder.java#L112-L148","documentation":"Error \"[field] must not be null: [{name}]\" thrown in elastic/elasticsearch.","triggerScenarios":"Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/ArrayValuesSourceAggregationBuilder.java:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:17:08.281Z"}