Foundry376/Mailspring · error · Error
Validation failed at ${keyPath}, ${JSON.stringify(value)} mu
Error message
Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an array What it means
Config schema enforcer for type 'array': Array.isArray failed on the value, so a schema-declared array key received a non-array (usually an object literal or comma-separated string). Each item would otherwise be coerced against schema.items.
Source
Thrown at app/src/config.ts:873
childSchema
);
} catch (error) {
console.warn(`Error setting item in object: ${error.message}`);
}
} else {
// Just pass through un-schema'd values
newValue[prop] = propValue;
}
}
return newValue;
},
},
array: {
coerce(keyPath, value, schema) {
if (!Array.isArray(value)) {
throw new Error(
`Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an array`
);
}
const itemSchema = schema.items;
if (itemSchema != null) {
const newValue = [];
for (const item of value) {
try {
newValue.push(this.executeSchemaEnforcers(keyPath, item, itemSchema));
} catch (error) {
console.warn(`Error setting item in array: ${error.message}`);
}
}
return newValue;
} else {
return value;
}
},View on GitHub (pinned to 648c685d60)
Solutions
- Write the setting as a JSON array
- Split delimited strings into arrays before calling config.set
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/src/config.ts:873 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Foundry376/Mailspring@648c685d60 (2026-09-03).
Data as JSON: /api/errors/4d9753ab4c218dfc.
Report an issue: GitHub.