{"record":{"id":"8552f6b14d8be447","repo":"kestra-io/kestra","slug":"a-plugin-can-only-access-configuration-properties","errorCode":null,"errorMessage":"A plugin can only access configuration properties from the 'kestra.tasks' root property","messagePattern":"A plugin can only access configuration properties from the 'kestra\\.tasks' root property","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/DefaultRunContext.java","lineNumber":704,"sourceCode":"    }\n\n    /**\n     * Get access to Kestra internal services.\n     * WARNING: this should only be used for very specific needs, plugins should try to avoid using an Kestra internal service.\n     */\n    public Services services() {\n        return new Services(this.applicationContext);\n    }\n\n    /**\n     * Get a task configuration property from the underlying application context.\n     * A task property is a property under the 'kestra.tasks' configuration root.\n     *\n     * @throws IllegalArgumentException if a property is not inside the 'kestra.tasks' configuration root.\n     */\n    public <T> Optional<T> getTaskProperty(String name, Class<T> clazz) {\n        if (!name.startsWith(\"kestra.tasks.\")) {\n            throw new IllegalArgumentException(\"A plugin can only access configuration properties from the 'kestra.tasks' root property\");\n        }\n        return this.applicationContext.getProperty(name, clazz);\n    }\n\n    /**\n     * Builder class for constructing new {@link DefaultRunContext} objects.\n     */\n    @NoArgsConstructor\n    @AllArgsConstructor\n    @With\n    public static class Builder {\n        private ApplicationContext applicationContext;\n        private VariableRenderer variableRenderer;\n        private StorageInterface storageInterface;\n        private MetricRegistry meterRegistry;\n        private Map<String, Object> variables;\n        private List<WorkerTaskResult> dynamicWorkerResults;\n        private Map<String, Object> pluginConfiguration;","sourceCodeStart":686,"sourceCodeEnd":722,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/DefaultRunContext.java#L686-L722","documentation":"Error \"A plugin can only access configuration properties from the 'kestra.tasks' root property\" thrown in kestra-io/kestra.","triggerScenarios":"Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:704 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restrict the plugin's configuration lookup to properties under the 'kestra.tasks' root, e.g. 'kestra.tasks.<plugin>.<property>'.","Move any needed custom configuration under 'kestra.tasks' in the Kestra configuration file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}