{"record":{"id":"3dec1e7215e66f97","repo":"Foundry376/Mailspring","slug":"validation-failed-at-keypath-json-stringify-3dec1e","errorCode":null,"errorMessage":"Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an object","messagePattern":"Validation failed at (.+?), (.+?) must be an object","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/config.ts","lineNumber":838,"sourceCode":"      }\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: {\n    coerce(keyPath, value, schema) {\n      if (!isPlainObject(value)) {\n        throw new Error(\n          `Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an object`\n        );\n      }\n      if (schema.properties == null) {\n        return value;\n      }\n\n      const newValue = {};\n      for (const prop in value) {\n        const propValue = value[prop];\n        const childSchema = schema.properties[prop];\n        if (childSchema != null) {\n          try {\n            newValue[prop] = this.executeSchemaEnforcers(\n              `${keyPath}.${prop}`,\n              propValue,\n              childSchema\n            );","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/src/config.ts#L820-L856","documentation":"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.","triggerScenarios":"Thrown at app/src/config.ts:838 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"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"}