{"record":{"id":"01cdb055a23edd23","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-where-holds-a-non-finite-num","errorCode":null,"errorMessage":"credentials-local: ${where} holds a non-finite number","messagePattern":"credentials-local: (.+?) holds a non-finite number","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":404,"sourceCode":"}\n\n/**\n * Reject a payload that cannot survive a JSON round trip, on the way in and on\n * the way out. The seam promises owners their payload comes back exactly as\n * written, and both directions can break that: a document may spell `.inf` or\n * an alias cycle, and an owner may hand over a `Date`, a class instance, or a\n * `bigint` that this document has no faithful spelling for. Neither the value\n * nor any nested value is quoted in a diagnostic.\n * @param where - the subject named in a diagnostic, already free of any value.\n * @param value - the payload or nested value to admit.\n * @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.","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L386-L422","documentation":"Error \"credentials-local: ${where} holds a non-finite number\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:404 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"}