Foundry376/Mailspring · error · Error
Validation failed at ${keyPath}, ${JSON.stringify(value)} mu
Error message
Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an object What it means
Config schema enforcer for type 'object': the value failed the isPlainObject check (arrays, null, class instances, or primitives all fail), so it cannot be validated against the schema's properties. Fires when a config key declared as an object receives an array or scalar.
Source
Thrown at app/src/config.ts:838
}
return value;
},
},
null: {
// null sort of isnt supported. It will just unset in this case
coerce(keyPath, value, schema) {
if (![undefined, null].includes(value)) {
throw new Error(`Validation failed at ${keyPath}, ${JSON.stringify(value)} must be null`);
}
return value;
},
},
object: {
coerce(keyPath, value, schema) {
if (!isPlainObject(value)) {
throw new Error(
`Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an object`
);
}
if (schema.properties == null) {
return value;
}
const newValue = {};
for (const prop in value) {
const propValue = value[prop];
const childSchema = schema.properties[prop];
if (childSchema != null) {
try {
newValue[prop] = this.executeSchemaEnforcers(
`${keyPath}.${prop}`,
propValue,
childSchema
);View on GitHub (pinned to 648c685d60)
Solutions
- Write a plain JSON object literal at keyPath (arrays are rejected even if intended)
- Fix hand-edited config.json where braces were dropped or the value became an array
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/src/config.ts:838 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/3dec1e7215e66f97.
Report an issue: GitHub.