{"record":{"id":"0252fe955e5e08b6","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-record-key-env-name-i","errorCode":null,"errorMessage":"credentials-local: record \"${key}\" env \"${name}\" in ${filename} must be a non-empty string","messagePattern":"credentials-local: record \"(.+?)\" env \"(.+?)\" in (.+?) must be a non-empty string","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":379,"sourceCode":"function assertFields(key: string, fields: Record<string, unknown>, allowed: string[], filename: string): void {\n  for (const field of Object.keys(fields)) {\n    if (!allowed.includes(field)) {\n      throw new Error(`credentials-local: record \"${key}\" in ${filename} has unknown field \"${field}\"`)\n    }\n  }\n}\n\n/** Admit an api-key record's provider environment: POSIX names over non-empty strings. */\nfunction parseRecordEnv(key: string, env: unknown, filename: string): Record<string, string> | undefined {\n  if (env === undefined) return undefined\n  if (typeof env !== 'object' || env === null || Array.isArray(env)) {\n    throw new TypeError(`credentials-local: record \"${key}\" in ${filename} has a non-mapping env`)\n  }\n  const parsed: Record<string, string> = {}\n  for (const [name, value] of Object.entries(env as Record<string, unknown>)) {\n    credentialRef(name)\n    if (typeof value !== 'string' || value.length === 0) {\n      throw new TypeError(\n        `credentials-local: record \"${key}\" env \"${name}\" in ${filename} must be a non-empty string`,\n      )\n    }\n    parsed[name] = value\n  }\n  return parsed\n}\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.","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L361-L397","documentation":"Error \"credentials-local: record \"${key}\" env \"${name}\" in ${filename} must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:379 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"}