{"record":{"id":"2fcf73af53d0baff","repo":"deepseek-ai/deepseek-harness","slug":"path-retryablecodes-must-not-be-empty","errorCode":null,"errorMessage":"${path}.retryableCodes must not be empty","messagePattern":"(.+?)\\.retryableCodes must not be empty","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/llm/llm/src/retry-policy.ts","lineNumber":171,"sourceCode":"  if (config === undefined) {\n    return Object.freeze({\n      mode: 'normal',\n      maxRetries: DEFAULT_MAX_RETRIES,\n      retryableCodes: DEFAULT_RETRYABLE_CODES,\n      ...resolveBackoff(undefined, `${path}.backoff`),\n    })\n  }\n\n  switch (config.mode) {\n    case 'normal': {\n      validateKeys(config, NORMAL_POLICY_KEYS, path)\n      const maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES\n      const retryableCodes = config.retryableCodes ?? [...DEFAULT_RETRYABLE_CODES]\n      if (!Number.isSafeInteger(maxRetries) || maxRetries < 0) {\n        throw new Error(`${path}.maxRetries must be a non-negative safe integer`)\n      }\n      if (retryableCodes.length === 0) {\n        throw new Error(`${path}.retryableCodes must not be empty`)\n      }\n      if (retryableCodes.some(code => typeof code !== 'string' || code.length === 0)) {\n        throw new Error(`${path}.retryableCodes must contain only non-empty strings`)\n      }\n      if (new Set(retryableCodes).size !== retryableCodes.length) {\n        throw new Error(`${path}.retryableCodes must not contain duplicates`)\n      }\n      return Object.freeze({\n        mode: 'normal',\n        maxRetries,\n        retryableCodes: Object.freeze([...retryableCodes]),\n        ...resolveBackoff(config.backoff, `${path}.backoff`),\n      })\n    }\n    case 'always':\n      validateKeys(config, ALWAYS_POLICY_KEYS, path)\n      return Object.freeze({\n        mode: 'always',","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm/src/retry-policy.ts#L153-L189","documentation":"Validation guard in resolveRetryPolicy: a 'normal'-mode retry config supplied an empty retryableCodes array, which would make the policy unable to match any retryable error, so it is rejected at configuration time instead of silently never retrying.","triggerScenarios":"Thrown at packages/llm/llm/src/retry-policy.ts:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide at least one entry in retryableCodes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}