{"record":{"id":"61f3fa2bed5e8080","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-the-value-for-key-in-fil","errorCode":null,"errorMessage":"credentials-local: the value for \"${key}\" in ${filename} must be a string","messagePattern":"credentials-local: the value for \"(.+?)\" in (.+?) must be a string","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":279,"sourceCode":"    }\n    if (!isScalar(pair.value) || typeof pair.value.value !== 'string' || pair.value.value.length === 0) return undefined\n  }\n  const body = text.split('\\n').map(line => (line.length === 0 ? line : `  ${line}`)).join('\\n')\n  return `version: ${DOCUMENT_VERSION}\\nrefs:\\n${body}${text.endsWith('\\n') ? '' : '\\n'}`\n}\n\n/** Admit a `refs` section: POSIX-identifier keys over non-empty string values. */\nfunction parseRefs(section: unknown, filename: string): Map<string, string> {\n  const entries = new Map<string, string>()\n  for (const [key, value] of Object.entries(asSection(section, 'refs', filename))) {\n    // credentialRef throws on anything that is not a POSIX identifier, which\n    // is exactly the constraint a stored reference must satisfy to be\n    // addressable through the seam.\n    credentialRef(key)\n    // The key name is quoted, never the value: a wrong-typed entry is still a\n    // secret the user meant to store.\n    if (typeof value !== 'string') {\n      throw new TypeError(`credentials-local: the value for \"${key}\" in ${filename} must be a string`)\n    }\n    if (value.length === 0) {\n      throw new Error(`credentials-local: the value for \"${key}\" in ${filename} is empty; remove the key instead`)\n    }\n    entries.set(key, value)\n  }\n  return entries\n}\n\n/** Admit a `records` section: `<scope>/<id>` keys over tagged record mappings. */\nfunction parseRecords(section: unknown, filename: string): Map<string, CredentialRecord> {\n  const entries = new Map<string, CredentialRecord>()\n  for (const [key, value] of Object.entries(asSection(section, 'records', filename))) {\n    parseCredentialKey(key)\n    entries.set(key, parseRecord(key, value, filename))\n  }\n  return entries\n}","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L261-L297","documentation":"Error \"credentials-local: the value for \"${key}\" in ${filename} must be a string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:279 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"}