{"record":{"id":"151a1bc2191fffc0","repo":"xpipe-io/xpipe","slug":"invalidpathmessage","errorCode":null,"errorMessage":"${invalidPathMessage}","messagePattern":"\\$\\{invalidPathMessage\\}","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"ext/base/src/main/java/io/xpipe/ext/base/script/ScriptCollectionSource.java","lineNumber":79,"sourceCode":"                                    entry -> DataStorage.get().local().equals(entry),\n                                    true),\n                            path)\n                    .nonNull()\n                    .bind(\n                            () -> Directory.builder()\n                                    .path(path.get() != null ? ContextualFileReference.of(path.get()) : null)\n                                    .build(),\n                            property);\n        }\n\n        @Override\n        public void checkComplete() throws ValidationException {\n            Validators.nonNull(path);\n            // Check if path is invalid\n            try {\n                path.toLocalAbsoluteFilePath().asLocalPath();\n            } catch (InvalidPathException e) {\n                throw new ValidationException(e.getMessage());\n            }\n        }\n\n        @Override\n        public void prepare() {\n            if (!Files.isDirectory(getLocalPath())) {\n                throw ErrorEventFactory.expected(\n                        new IllegalStateException(\"Source directory \" + path + \" does not exist\"));\n            }\n        }\n\n        @Override\n        public Path getLocalPath() {\n            return path.toLocalAbsoluteFilePath().asLocalPath();\n        }\n\n        @Override\n        public String toSummary() {","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/ext/base/src/main/java/io/xpipe/ext/base/script/ScriptCollectionSource.java#L61-L97","documentation":"ScriptCollectionSource.checkComplete() requires a non-null path and verifies it can be converted to a valid local file path. If path.toLocalAbsoluteFilePath().asLocalPath() throws InvalidPathException, the underlying exception message is rethrown as a ValidationException (the \"${invalidPathMessage}\" is the platform-specific InvalidPathException message).","triggerScenarios":"Calling checkComplete() on a script collection source whose path field is set to a string that the local filesystem provider rejects as a path (illegal characters, wrong syntax, or path containing null/invalid chars).","commonSituations":"Windows-illegal characters (<>|:?*\") in a script path entered by the user; Unix-style paths pasted on Windows or vice versa; environment-variable expansion producing a malformed path; empty or whitespace-only path segments.","solutions":["Correct the path in the script source so it is a syntactically valid local path for the current OS","Use an absolute path without illegal characters","Verify the path converts with java.nio.file.Path.of(value) before saving","On Windows, ensure drive letters and separators are correct (C:\\\\scripts\\\\...)"],"exampleFix":"// before\nsource.setPath(FilePath.of(\"~/scripts/:foo\")); // invalid on Windows\n// after\nsource.setPath(FilePath.of(\"C:\\\\Users\\\\me\\\\scripts\\\\deploy\"));","handlingStrategy":"validation","validationCode":"try {\n    java.nio.file.Path.of(pathValue);\n} catch (java.nio.file.InvalidPathException e) {\n    // reject the path before calling checkComplete()\n}","typeGuard":null,"tryCatchPattern":"try { source.checkComplete(); }\ncatch (ValidationException e) {\n    // show e.getMessage() (InvalidPathException text) to the user\n}","preventionTips":["Validate paths with java.nio.file.Path.of before saving","Avoid OS-illegal characters in script paths","Prefer absolute paths"],"tags":["validation","path","invalid-path"],"backgroundTag":"invalid-argument-format","analyzedSha":"d85ca821baa46092a320ebb13546d7240adb74f8","analyzedAt":"2026-09-06T14:30:08.251Z","contentChangedAt":"2026-09-06T14:30:08.251Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}