Foundry376/Mailspring · error · Error
Validation failed at ${keyPath}, ${JSON.stringify(value)} mu
Error message
Validation failed at ${keyPath}, ${JSON.stringify(value)} must be a string What it means
Config schema enforcer for type 'string' (validate pass, no coercion): the value stored or being set at keyPath has a non-string type. The string enforcer deliberately does not stringify numbers/objects, so callers must pass actual strings.
Source
Thrown at app/src/config.ts:817
)} 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: {
validate(keyPath, value, schema) {
if (typeof value !== 'string') {
throw new Error(
`Validation failed at ${keyPath}, ${JSON.stringify(value)} must be a string`
);
}
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: {View on GitHub (pinned to 648c685d60)
Solutions
- Convert the value to a string before setting (String(value) or template literal)
- Fix hand-edited JSON where a string setting was written as a number/boolean
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/src/config.ts:817 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/00b0a380be7c7834.
Report an issue: GitHub.