{"record":{"id":"6a0a21a4d2944be3","repo":"deepseek-ai/deepseek-harness","slug":"path-maxdelayms-must-be-a-positive-finite-numbe-6a0a21","errorCode":null,"errorMessage":"${path}.maxDelayMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}","messagePattern":"(.+?)\\.maxDelayMs must be a positive finite number no greater than (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/mcp/mcp-client/src/connection.ts","lineNumber":80,"sourceCode":" * @param path - Diagnostic prefix naming the config location in thrown messages.\n * @returns The frozen resolved policy.\n */\nexport function resolveReconnectPolicy(config: ReconnectConfig | undefined, path: string): ResolvedReconnectPolicy {\n  if (config !== undefined) {\n    for (const key of Object.keys(config)) {\n      if (!Object.hasOwn(RECONNECT_DEFAULTS, key)) throw new Error(`${path}.${key} is not a reconnect option`)\n    }\n  }\n  const enabled = config?.enabled ?? RECONNECT_DEFAULTS.enabled\n  const initialDelayMs = config?.initialDelayMs ?? RECONNECT_DEFAULTS.initialDelayMs\n  const maxDelayMs = config?.maxDelayMs ?? RECONNECT_DEFAULTS.maxDelayMs\n  const maxAttempts = config?.maxAttempts ?? RECONNECT_DEFAULTS.maxAttempts\n  /* jscpd:ignore-start — domain-specific delay validation parallels llm retry-policy; not extractable */\n  if (!Number.isFinite(initialDelayMs) || initialDelayMs <= 0 || initialDelayMs > MAX_TIMER_DELAY_MS) {\n    throw new Error(`${path}.initialDelayMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}`)\n  }\n  if (!Number.isFinite(maxDelayMs) || maxDelayMs <= 0 || maxDelayMs > MAX_TIMER_DELAY_MS) {\n    throw new Error(`${path}.maxDelayMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}`)\n  }\n  if (initialDelayMs > maxDelayMs) {\n    throw new Error(`${path}.initialDelayMs must be less than or equal to maxDelayMs`)\n  }\n  if (!Number.isInteger(maxAttempts) || maxAttempts < 1) {\n    throw new Error(`${path}.maxAttempts must be a positive integer`)\n  }\n  /* jscpd:ignore-end */\n  return Object.freeze({ enabled, initialDelayMs, maxDelayMs, maxAttempts })\n}\n\n/** Result from the initial connection attempt, for startup-await semantics. */\nexport interface ConnectionOutcome {\n  /** If the initial connection or tool sync failed, the error; otherwise absent. */\n  error?: unknown\n}\n\n/** Handle for one plugin instance's supervised connection. */","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/mcp/mcp-client/src/connection.ts#L62-L98","documentation":"Error \"${path}.maxDelayMs must be a positive finite number no greater than ${MAX_TIMER_DELAY_MS}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/mcp/mcp-client/src/connection.ts:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set maxDelayMs to a positive finite number no greater than the stated timer cap."],"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"}