{"record":{"id":"25b99efef61e16af","repo":"paperclipai/paperclip","slug":"invalid-paperclip-config-at-configpath-forma","errorCode":null,"errorMessage":"Invalid Paperclip config at ${configPath}: ${formatConfigValidationError(error)}","messagePattern":"Invalid Paperclip config at (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/config-file.ts","lineNumber":42,"sourceCode":"  let raw: unknown;\n  try {\n    raw = JSON.parse(fs.readFileSync(configPath, \"utf-8\"));\n  } catch (error) {\n    const reason = error instanceof Error ? error.message : String(error);\n    throw new Error(`Invalid Paperclip config at ${configPath}: failed to read or parse JSON: ${reason}`);\n  }\n\n  try {\n    const config = paperclipConfigSchema.parse(raw);\n    for (const warning of findPaperclipConfigKeyWarnings(config)) {\n      console.warn(\n        `Unknown config key ${warning.path}; did you mean ${warning.suggestion}? It will be preserved.`,\n      );\n    }\n    return config;\n  } catch (error) {\n    if (error instanceof ZodError) {\n      throw new Error(`Invalid Paperclip config at ${configPath}: ${formatConfigValidationError(error)}`);\n    }\n\n    throw error;\n  }\n}\n","sourceCodeStart":24,"sourceCodeEnd":48,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/config-file.ts#L24-L48","documentation":"Schema failure in readConfigFile: the config JSON parsed but paperclipConfigSchema.parse rejected it, and the Zod issues are formatted as `path: message` pairs joined by '; '. Names exactly which config keys are invalid so the operator can correct them.","triggerScenarios":"Thrown at server/src/config-file.ts:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the invalid fields listed by the validation error in the config file."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}