{"record":{"id":"390dd7de8e20fff0","repo":"kestra-io/kestra","slug":"the-argument-value-is-required","errorCode":null,"errorMessage":"The argument 'value' is required.","messagePattern":"The argument 'value' is required\\.","errorType":"validation","errorClass":"PebbleException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/pebble/filters/EndsWithFilter.java","lineNumber":32,"sourceCode":"    public static final String FILTER_NAME = \"endsWith\";\n\n    private static final String ARGUMENT_VALUE = \"value\";\n\n    private final static List<String> ARGS = List.of(ARGUMENT_VALUE);\n\n    @Override\n    public List<String> getArgumentNames() {\n        return ARGS;\n    }\n\n    @Override\n    public Object apply(Object input, Map<String, Object> args, PebbleTemplate self, EvaluationContext context, int lineNumber) throws PebbleException {\n        if (input == null) {\n            return false;\n        }\n\n        if (args.get(ARGUMENT_VALUE) == null) {\n            throw new PebbleException(\n                null,\n                MessageFormat.format(\"The argument ''{0}'' is required.\", ARGUMENT_VALUE),\n                lineNumber,\n                self.getName()\n            );\n        }\n\n        String data = input.toString();\n\n        return data.endsWith(args.get(ARGUMENT_VALUE).toString());\n    }\n}\n","sourceCodeStart":14,"sourceCodeEnd":45,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/pebble/filters/EndsWithFilter.java#L14-L45","documentation":"Thrown by the EndsWithFilter when the required 'value' argument is null or missing. The endsWith filter checks whether the input string ends with the given suffix; without the suffix, the check is meaningless.","triggerScenarios":"Calling endsWith without the value argument, or with a value that resolves to null: '{{ mystring | endsWith }}', '{{ mystring | endsWith(vars.missing) }}' where vars.missing is undefined.","commonSituations":"A suffix value sourced from an optional variable that may be absent. Forgetting to pass the argument in a copy-pasted template. A variable name typo causing the argument to resolve to null.","solutions":["Provide a non-null string value argument: '{{ mystring | endsWith(\".txt\") }}'.","Guard optional variables with a default: '{{ mystring | endsWith(vars.suffix ?? \"\") }}'.","Verify the variable name spelling and that it is defined in the flow."],"exampleFix":"{# before #}\n{{ filename | endsWith(vars.ext) }}\n{# vars.ext is undefined #}\n\n{# after #}\n{{ filename | endsWith(vars.ext ?? \".txt\") }}","handlingStrategy":"validation","validationCode":"{# Always provide a non-null value argument to endsWith #}\n{% set suffix = vars.suffix ?? \".txt\" %}\n{{ filename | endsWith(suffix) }}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass the value argument explicitly to endsWith.","Default optional suffix variables with ?? to a non-null fallback.","Verify variable names are spelled correctly and defined in the flow."],"tags":["pebble","endswith-filter","missing-argument"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}