Foundry376/Mailspring · error · Error
Validation failed at ${keyPath}, ${JSON.stringify(value)} mu
Error message
Validation failed at ${keyPath}, ${JSON.stringify(value)} must be a boolean or the string 'true' or 'false' What it means
Config schema enforcer for type 'boolean': the value is neither a real boolean nor one of the case-insensitive strings 'true'/'false' (e.g. 1, 'yes', undefined object types). The config system only accepts those narrow forms when coercing booleans.
Source
Thrown at app/src/config.ts:796
`Validation failed at ${keyPath}, ${JSON.stringify(
value
)} cannot be coerced into a number`
);
}
return value;
},
},
boolean: {
coerce(keyPath, value, schema) {
switch (typeof value) {
case 'string':
if (value.toLowerCase() === 'true') {
return true;
} else if (value.toLowerCase() === 'false') {
return false;
} else {
throw new Error(
`Validation failed at ${keyPath}, ${JSON.stringify(
value
)} must be a boolean or the string 'true' or 'false'`
);
}
case 'boolean':
return value;
default:
throw new Error(
`Validation failed at ${keyPath}, ${JSON.stringify(
value
)} must be a boolean or the string 'true' or 'false'`
);
}
},
},
string: {View on GitHub (pinned to 648c685d60)
Solutions
- Set the key to true, false, or the exact strings 'true'/'false'
- Convert boolean-like inputs (checkbox tri-state, 0/1) before calling config.set
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/src/config.ts:796 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/25c76457e824769c.
Report an issue: GitHub.