{"record":{"id":"7a8daaccdc2134a1","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-an-empty-value-cannot-be-stored","errorCode":null,"errorMessage":"credentials-local: an empty value cannot be stored for \"${ref}\"; use unset","messagePattern":"credentials-local: an empty value cannot be stored for \"(.+?)\"; use unset","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":643,"sourceCode":"  }\n\n  override describe(ref: CredentialRef): Promise<CredentialInfo> {\n    // Only the inherited environment is unwritable: it is the one layer this\n    // process cannot edit. A user `.env` value is writable in the sense that\n    // matters — storing a key replaces it as the effective one.\n    if (this.inherited(ref) !== undefined) {\n      return Promise.resolve({ configured: true, source: 'env', writable: false })\n    }\n    const stored = this.values.get(ref)\n    if (stored !== undefined) return Promise.resolve({ configured: true, source: 'file', writable: true })\n    const fallback = this.dotenvFallback(ref)\n    if (fallback !== undefined) return Promise.resolve({ configured: true, source: fallback.source, writable: true })\n    return Promise.resolve({ configured: false, writable: true })\n  }\n\n  override async set(ref: CredentialRef, value: string): Promise<void> {\n    if (value.length === 0) {\n      throw new Error(`credentials-local: an empty value cannot be stored for \"${ref}\"; use unset`)\n    }\n    await this.write(ref, value)\n  }\n\n  override async unset(ref: CredentialRef): Promise<void> {\n    await this.write(ref, undefined)\n  }\n\n  override readRecord(key: CredentialKey): Promise<CredentialRecord | undefined> {\n    return Promise.resolve(this.records.get(key))\n  }\n\n  override describeRecord(key: CredentialKey): Promise<CredentialRecordInfo> {\n    const stored = this.records.get(key)\n    // Presence is the whole fact here: no layer ranks above this document for\n    // a record, so nothing can shadow one, and an api-key record carrying\n    // neither a key nor environment values is a deliberate statement rather\n    // than a blank.","sourceCodeStart":625,"sourceCodeEnd":661,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L625-L661","documentation":"Error \"credentials-local: an empty value cannot be stored for \"${ref}\"; use unset\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:643 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"}