{"record":{"id":"8cca7e65112ca2a4","repo":"kestra-io/kestra","slug":"scheme-not-supported-supported-schemes-are","errorCode":null,"errorMessage":"Scheme not supported: {}. Supported schemes are: {}","messagePattern":"Scheme not supported: (.+?)\\. Supported schemes are: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/models/property/URIFetcher.java","lineNumber":40,"sourceCode":"\n    /**\n     * Build a new URI Fetcher from a String URI.\n     * WARNING: the URI must be rendered before.\n     *\n     * A factory method is also provided for fluent style programming, see {@link #of(String).}\n     */\n    public URIFetcher(String uri) {\n        this(URI.create(uri));\n    }\n\n    /**\n     * Build a new URI Fetcher from a URI.\n     *\n     * A factory method is also provided for fluent style programming, see {@link #of(URI).}\n     */\n    public URIFetcher(URI uri) {\n        if (SUPPORTED_SCHEMES.stream().noneMatch(s -> s.equals(uri.getScheme()))) {\n            throw new IllegalArgumentException(\"Scheme not supported: \" + uri.getScheme() + \". Supported schemes are: \" + SUPPORTED_SCHEMES);\n        }\n\n        this.uri = uri;\n    }\n\n    /**\n     * Build a new URI Fetcher from a String URI.\n     * WARNING: the URI must be rendered before.\n     */\n    public static URIFetcher of(String uri) {\n        return new URIFetcher(uri);\n    }\n\n    /**\n     * Build a new URI Fetcher from a URI.\n     */\n    public static URIFetcher of(URI uri) {\n        return new URIFetcher(uri);","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/models/property/URIFetcher.java#L22-L58","documentation":"Thrown by the URIFetcher(URI) constructor when the URI's scheme is not in SUPPORTED_SCHEMES, which is the fixed list [kestra://, file://, namespace://]. URIFetcher is the typed reader for property URIs resolved at execution time, and it refuses to construct for schemes it cannot fetch (e.g., http, https, s3, gs). The message echoes both the bad scheme and the full supported list for self-correction.","triggerScenarios":"Passing an http(s):// URI to new URIFetcher(...) or URIFetcher.of(...); passing a cloud-storage scheme (s3://, gs://); passing a relative path with no scheme; a Pebble-rendered URI resolves to an unexpected scheme.","commonSituations":"A task property is set to an external URL instead of a Kestra internal storage reference; plugin author assumes HTTP is supported; the URI was rendered from a variable that contained a full URL.","solutions":["Use 'kestra://' for internal storage, 'namespace://' for namespace files, or 'file://' for worker-local files.","If you need HTTP content, download it into internal storage first, then reference the kestra:// URI.","Verify the rendered URI scheme before constructing the fetcher."],"exampleFix":"// before\nnew URIFetcher(\"https://example.com/data.csv\")\n// IllegalArgumentException: Scheme not supported: https\n\n// after\nURI stored = runContext.storage().putFile(downloadedFile);\nnew URIFetcher(stored);   // kestra://...","handlingStrategy":"validation","validationCode":"List<String> SUPPORTED = List.of(\"kestra\", \"file\", \"namespace\");\nif (uri.getScheme() == null || !SUPPORTED.contains(uri.getScheme())) {\n    throw new IllegalArgumentException(\"Scheme not supported: \" + uri.getScheme());\n}","typeGuard":"function isSupportedScheme(uri: string): boolean {\n  return /^(kestra|file|namespace):\\/\\//.test(uri);\n}","tryCatchPattern":"try {\n    new URIFetcher(uri);\n} catch (IllegalArgumentException e) {\n    // fetch external content into storage first, then retry with kestra://\n    log.warn(\"Unsupported URI scheme; download into internal storage first.\");\n}","preventionTips":["Resolve external URLs into kestra:// storage URIs before constructing a URIFetcher.","Validate the scheme before passing user-supplied URIs."],"tags":["property","uri","validation","storage"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}