{"record":{"id":"25c76457e824769c","repo":"Foundry376/Mailspring","slug":"validation-failed-at-keypath-json-stringify-25c764","errorCode":null,"errorMessage":"Validation failed at ${keyPath}, ${JSON.stringify(value)} must be a boolean or the string 'true' or 'false'","messagePattern":"Validation failed at (.+?), (.+?) must be a boolean or the string 'true' or 'false'","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/config.ts","lineNumber":796,"sourceCode":"          `Validation failed at ${keyPath}, ${JSON.stringify(\n            value\n          )} cannot be coerced into a number`\n        );\n      }\n      return value;\n    },\n  },\n\n  boolean: {\n    coerce(keyPath, value, schema) {\n      switch (typeof value) {\n        case 'string':\n          if (value.toLowerCase() === 'true') {\n            return true;\n          } else if (value.toLowerCase() === 'false') {\n            return false;\n          } else {\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        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: {","sourceCodeStart":778,"sourceCodeEnd":814,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/src/config.ts#L778-L814","documentation":"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.","triggerScenarios":"Thrown at app/src/config.ts:796 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"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"}