deepseek-ai/deepseek-harness · error · TypeError
credentials-local: record "${key}" env "${name}" must be a n
Error message
credentials-local: record "${key}" env "${name}" must be a non-empty string What it means
Error "credentials-local: record "${key}" env "${name}" must be a non-empty string" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/credentials/credentials-local/src/index.ts:314
return entries
}
/**
* Refuse an api-key record the read path could not admit, before it is
* rendered: an empty key, an env name outside the reference grammar, or an
* empty env value would persist a document `parseRecord` rejects at the next
* boot — a durable-boundary write is validated where it is written.
* @param key - the record's credential key, for the failure message.
* @param record - the api-key record a mutation returned.
*/
function assertStorableApiKey(key: CredentialKey, record: ApiKeyRecord): void {
if (record.key !== undefined && record.key.length === 0) {
throw new TypeError(`credentials-local: record "${key}" has an empty key; omit the field instead`)
}
for (const [name, value] of Object.entries(record.env ?? {})) {
credentialRef(name)
if (value.length === 0) {
throw new TypeError(`credentials-local: record "${key}" env "${name}" must be a non-empty string`)
}
}
}
/** One section of the document as a plain mapping; absent and null both mean empty. */
function asSection(section: unknown, name: string, filename: string): Record<string, unknown> {
if (section === undefined || section === null) return {}
if (typeof section !== 'object' || Array.isArray(section)) {
throw new TypeError(`credentials-local: "${name}" in ${filename} must be a mapping`)
}
return section as Record<string, unknown>
}
/** Admit one record entry, rejecting an unknown tag or field rather than dropping it. */
function parseRecord(key: string, value: unknown, filename: string): CredentialRecord {
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
throw new TypeError(`credentials-local: record "${key}" in ${filename} must be a mapping`)
}View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/credentials/credentials-local/src/index.ts:314 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/598b66b5ef3ed49c.
Report an issue: GitHub.