{"record":{"id":"b5a7f3a714ff422e","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-where-holds-a-value-json-can","errorCode":null,"errorMessage":"credentials-local: ${where} holds a value JSON cannot represent","messagePattern":"credentials-local: (.+?) holds a value JSON cannot represent","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":415,"sourceCode":" * @param seen - objects on the current path, for cycle detection.\n * @throws TypeError naming `where` when the value cannot round-trip.\n */\nfunction assertJsonValue(where: string, value: unknown, seen: Set<object>): void {\n  if (value === null || typeof value === 'string' || typeof value === 'boolean') return\n  if (typeof value === 'number') {\n    if (Number.isFinite(value)) return\n    throw new TypeError(`credentials-local: ${where} holds a non-finite number`)\n  }\n  if (typeof value === 'object') {\n    if (seen.has(value)) throw new TypeError(`credentials-local: ${where} is cyclic`)\n    if (Object.getPrototypeOf(value) === Object.prototype || Array.isArray(value)) {\n      seen.add(value)\n      for (const nested of Object.values(value)) assertJsonValue(where, nested, seen)\n      seen.delete(value)\n      return\n    }\n  }\n  throw new TypeError(`credentials-local: ${where} holds a value JSON cannot represent`)\n}\n\n/**\n * The comment-preserving mutable tree one edit renders from. Editing the\n * parsed document rather than rebuilding it keeps comments and the formatting\n * of every untouched entry; an absent document starts a fresh one.\n * @param text - the current document text, `undefined` while the file is absent.\n * @returns the tree to edit, carrying this build's version stamp.\n */\nfunction mutableDocument(text: string | undefined): Document {\n  // `text` only ever caches content that parsed successfully, so this re-parse\n  // for the mutable comment-preserving tree cannot fail.\n  const document = text === undefined ? new Document({}) : parseDocument(text)\n  // Stamped on every edit so a document this provider creates is readable by\n  // the same parser that admitted the one it edits; an existing stamp is\n  // rewritten to the identical value.\n  document.setIn(['version'], DOCUMENT_VERSION)\n  return document","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L397-L433","documentation":"Error \"credentials-local: ${where} holds a value JSON cannot represent\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:415 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}