{"record":{"id":"300e95c66ab7185c","repo":"kestra-io/kestra","slug":"the-argument-0-is-required-300e95","errorCode":null,"errorMessage":"The argument ''{0}'' is required.","messagePattern":"The argument ''(.+?)'' is required\\.","errorType":"validation","errorClass":"PebbleException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/pebble/filters/StartsWithFilter.java","lineNumber":32,"sourceCode":"    public static final String FILTER_NAME = \"startsWith\";\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.startsWith(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/StartsWithFilter.java#L14-L45","documentation":"Thrown by the 'startsWith' Pebble filter when the required `value` argument is null or missing. The filter delegates to `String.startsWith(value)` and needs a non-null prefix to compare against.","triggerScenarios":"Writing `{{ s | startsWith }}` without arguments; passing a variable for `value` that resolved to null; misspelling the argument (e.g. `prefix=` or `with=` instead of `value=`).","commonSituations":"Refactoring drops the argument; referencing an unset input as the prefix; assuming a default empty prefix.","solutions":["Supply the named argument: `{{ s | startsWith(value=\"https://\") }}`.","Default dynamic prefixes: `value=inputs.prefix ?? \"\"`.","Remember the argument is named `value` (not `prefix`)."],"exampleFix":"# before\n{{ url | startsWith }}\n# after\n{{ url | startsWith(value=\"https://\") }}","handlingStrategy":"validation","validationCode":"# Always pass the value argument:\n{{ s | startsWith(value=inputs.prefix ?? \"\") }}","typeGuard":"{% if inputs.prefix is not null %}\n  {{ s | startsWith(value=inputs.prefix) }}\n{% endif %}","tryCatchPattern":null,"preventionTips":["Always pass `value` as a named argument to startsWith.","Remember the argument is named `value`, not `prefix`.","Default dynamic prefixes to an empty string when appropriate."],"tags":["pebble-filter","starts-with","missing-argument","string"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}