{"record":{"id":"9cead6db7a915596","repo":"paperclipai/paperclip","slug":"invalid-google-sheets-service-account-json-from","errorCode":null,"errorMessage":"Invalid Google Sheets service-account JSON from ${source}.","messagePattern":"Invalid Google Sheets service-account JSON from (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/google-sheets-mcp-server/src/config.ts","lineNumber":117,"sourceCode":"  if (inlineOrPath.startsWith(\"{\")) {\n    return { raw: inlineOrPath, source: \"inline JSON\" };\n  }\n\n  return { raw: readFileSync(inlineOrPath, \"utf8\"), source: inlineOrPath };\n}\n\nexport function createGoogleSheetsMcpConfig(input: GoogleSheetsMcpConfigInput): GoogleSheetsMcpConfig {\n  const allowedSpreadsheetIds = parseAllowedSpreadsheetIds(input.allowedSpreadsheetIds);\n  if (allowedSpreadsheetIds.length === 0) {\n    throw new Error(\"At least one allowed spreadsheet ID is required.\");\n  }\n\n  const { raw, source } = readServiceAccountJson(input);\n  let parsed: unknown;\n  try {\n    parsed = JSON.parse(raw);\n  } catch {\n    throw new Error(`Invalid Google Sheets service-account JSON from ${source}.`);\n  }\n\n  const serviceAccount = serviceAccountSchema.parse(parsed);\n  return {\n    serviceAccount,\n    allowedSpreadsheetIds,\n    secretRedactions: [\n      raw,\n      serviceAccount.private_key,\n      serviceAccount.client_email,\n    ].filter((value) => value.length >= 8),\n  };\n}\n\nexport function createGoogleSheetsMcpHttpConfig(input: GoogleSheetsMcpHttpConfigInput): GoogleSheetsMcpHttpConfig {\n  const token = input.token?.trim();\n  const host = normalizeBindHost(input.host);\n  if (!token && !isLoopbackBindHost(host)) {","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/google-sheets-mcp-server/src/config.ts#L99-L135","documentation":"Error \"Invalid Google Sheets service-account JSON from ${source}.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/google-sheets-mcp-server/src/config.ts:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the service-account JSON from the reported source is valid, complete JSON copied from Google Cloud Console."],"exampleFix":null,"handlingStrategy":null,"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"}