conductor-oss/conductor · error · IllegalArgumentException
File path is required
Error message
File path is required
What it means
Thrown by readFile() when the path argument is null or blank. The path query parameter is required to identify which file inside the skill's zip package to return. This is a simple precondition check before any storage or zip access occurs.
Source
Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java:263
() ->
new IllegalArgumentException(
"Skill not found: "
+ name
+ "@"
+ resolvedVersion));
return detail;
}
public byte[] packageBytes(String name, String version) {
requireSkillStorage();
SkillDetail detail = get(name, version);
return packageBytes(detail);
}
public SkillFileContent readFile(String name, String version, String path) {
requireSkillStorage();
if (path == null || path.isBlank()) {
throw new IllegalArgumentException("File path is required");
}
String cleanPath = normalizeEntryName(path);
SkillDetail detail = get(name, version);
byte[] packageBytes = packageBytes(detail);
try (ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(packageBytes))) {
ZipEntry entry;
while ((entry = zip.getNextEntry()) != null) {
if (entry.isDirectory()) {
continue;
}
String entryName = normalizeEntryName(entry.getName());
if (!entryName.equals(cleanPath)) {
continue;
}
if (entry.getSize() > maxPreviewBytes) {
throw new IllegalArgumentException(
"Skill file is too large to preview: " + cleanPath);
}View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Supply a non-empty path query param: GET /api/skills/foo/versions/1.0.0/files?path=SKILL.md.
- Validate on the client that path is non-blank before issuing the request.
- Use the skill detail's files list to pick a valid path first.
Example fix
// before GET /api/skills/foo/versions/1.0.0/files // after GET /api/skills/foo/versions/1.0.0/files?path=SKILL.md
Defensive patterns
Strategy: validation
Validate before calling
// Client-side before calling readFile
if (path == null || path.isBlank()) {
throw new IllegalArgumentException("path required");
}
skillRegistryService.readFile(name, version, path); Type guard
static boolean isValidFilePath(String path) {
return path != null && !path.isBlank() && !path.startsWith("/") && !path.contains("\0");
} Prevention
- Always pass a concrete file path sourced from the skill detail's files[] list.
- Treat a missing path as a programming error on the caller side, not a retryable condition.
When it happens
Trigger: GET /api/skills/{name}/versions/{version}/files with no path query param, or path= (empty), or path=%20. Also when a programmatic caller passes null directly to SkillRegistryService.readFile.
Common situations: Frontend that builds the URL but omits path when no row is selected; a client SDK that sends an empty string default; URL encoding stripping the value.
Related errors
- Skill manifest name '{manifestName}' does not match package
- Skill {name} version {version} already exists with a differe
- Skill file not found: {cleanPath}
- skillRef is required
- Skill manifest is required
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/fba7954bf36ff6ac.
Report an issue: GitHub.