conductor-oss/conductor · error · IllegalArgumentException
Missing required field: {key}
Error message
Missing required field: {key} What it means
requiredString throws when a mandatory metadata field is absent, null, or whitespace-only in a skill manifest. It is the generic guard for fields the registry cannot do without (e.g. name, version, the package's main entry). The key name in the message identifies which field is missing.
Source
Thrown at agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/SkillRegistryService.java:968
MessageDigest digest = MessageDigest.getInstance("SHA-256");
return hex(digest.digest(bytes));
} catch (Exception e) {
throw new IllegalStateException("SHA-256 digest is unavailable", e);
}
}
private static String hex(byte[] bytes) {
StringBuilder sb = new StringBuilder(bytes.length * 2);
for (byte b : bytes) {
sb.append(String.format("%02x", b));
}
return sb.toString();
}
private static String requiredString(Map<String, Object> map, String key) {
String value = stringValue(map.get(key));
if (value == null || value.isBlank()) {
throw new IllegalArgumentException("Missing required field: " + key);
}
return value;
}
private static String stringValue(Object value) {
return value instanceof String s ? s : null;
}
@SuppressWarnings("unchecked")
private static Map<String, Object> toMap(Object value) {
if (value instanceof Map<?, ?> map) {
return MAPPER.convertValue(map, Map.class);
}
return Map.of();
}
@SuppressWarnings("unchecked")
private static Map<String, Object> deepCopy(Map<String, Object> value) {View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Look at the `{key}` in the message — add a non-blank value for that exact field.
- Consult the skill manifest schema/spec to confirm which fields are mandatory.
- Re-validate the manifest locally (yaml lint + presence check) before uploading.
Example fix
// before name: my-skill version: # empty // after name: my-skill version: "1.0.0"
Defensive patterns
Strategy: validation
Validate before calling
void requireFields(Map<String,Object> manifest, String... keys) {
for (String k : keys) {
Object v = manifest.get(k);
if (!(v instanceof String s) || s.isBlank())
throw new IllegalArgumentException("Missing required field: " + k);
}
} Type guard
boolean hasRequiredFields(Map<String,Object> m, String... keys) {
for (String k : keys) { Object v = m.get(k); if (!(v instanceof String s) || s.isBlank()) return false; }
return true;
} Try / catch
try { skillRegistry.publish(manifest); }
catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Missing required field")) return badRequest(e.getMessage());
throw e;
} Prevention
- Maintain a checklist of mandatory manifest fields and lint it.
- Use a schema-validated manifest tool.
- Fill template placeholders before upload.
When it happens
Trigger: A manifest omits a required key, sets it to `null`, or supplies only whitespace (e.g. `description: " "`). requiredString returns null and throws, naming the key.
Common situations: Author deleted a field thinking it was optional; a generator template was not filled in; copy-paste left a placeholder value blank.
Related errors
- Invalid skill name '{name}'. Use 1-128 characters: letters,
- Invalid skill version '{version}'. Use 1-128 characters: let
- Skill manifest name '{manifestName}' does not match package
- Skill {name} version {version} already exists with a differe
- File path is required
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/7ab68ba248594638.
Report an issue: GitHub.