{"record":{"id":"00b0a380be7c7834","repo":"Foundry376/Mailspring","slug":"validation-failed-at-keypath-json-stringify-00b0a3","errorCode":null,"errorMessage":"Validation failed at ${keyPath}, ${JSON.stringify(value)} must be a string","messagePattern":"Validation failed at (.+?), (.+?) must be a string","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/config.ts","lineNumber":817,"sourceCode":"              )} must be a boolean or the string 'true' or 'false'`\n            );\n          }\n        case 'boolean':\n          return value;\n        default:\n          throw new Error(\n            `Validation failed at ${keyPath}, ${JSON.stringify(\n              value\n            )} must be a boolean or the string 'true' or 'false'`\n          );\n      }\n    },\n  },\n\n  string: {\n    validate(keyPath, value, schema) {\n      if (typeof value !== 'string') {\n        throw new Error(\n          `Validation failed at ${keyPath}, ${JSON.stringify(value)} must be a string`\n        );\n      }\n      return value;\n    },\n  },\n\n  null: {\n    // null sort of isnt supported. It will just unset in this case\n    coerce(keyPath, value, schema) {\n      if (![undefined, null].includes(value)) {\n        throw new Error(`Validation failed at ${keyPath}, ${JSON.stringify(value)} must be null`);\n      }\n      return value;\n    },\n  },\n\n  object: {","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/src/config.ts#L799-L835","documentation":"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.","triggerScenarios":"Thrown at app/src/config.ts:817 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"648c685d602ece6bb00c22534b8734de6ac644b3","analyzedAt":"2026-09-03T02:00:24.311Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}