{"record":{"id":"4d9753ab4c218dfc","repo":"Foundry376/Mailspring","slug":"validation-failed-at-keypath-json-stringify-4d9753","errorCode":null,"errorMessage":"Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an array","messagePattern":"Validation failed at (.+?), (.+?) must be an array","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/src/config.ts","lineNumber":873,"sourceCode":"              childSchema\n            );\n          } catch (error) {\n            console.warn(`Error setting item in object: ${error.message}`);\n          }\n        } else {\n          // Just pass through un-schema'd values\n          newValue[prop] = propValue;\n        }\n      }\n\n      return newValue;\n    },\n  },\n\n  array: {\n    coerce(keyPath, value, schema) {\n      if (!Array.isArray(value)) {\n        throw new Error(\n          `Validation failed at ${keyPath}, ${JSON.stringify(value)} must be an array`\n        );\n      }\n      const itemSchema = schema.items;\n      if (itemSchema != null) {\n        const newValue = [];\n        for (const item of value) {\n          try {\n            newValue.push(this.executeSchemaEnforcers(keyPath, item, itemSchema));\n          } catch (error) {\n            console.warn(`Error setting item in array: ${error.message}`);\n          }\n        }\n        return newValue;\n      } else {\n        return value;\n      }\n    },","sourceCodeStart":855,"sourceCodeEnd":891,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/src/config.ts#L855-L891","documentation":"Config schema enforcer for type 'array': Array.isArray failed on the value, so a schema-declared array key received a non-array (usually an object literal or comma-separated string). Each item would otherwise be coerced against schema.items.","triggerScenarios":"Thrown at app/src/config.ts:873 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write the setting as a JSON array","Split delimited strings into arrays 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"}