{"record":{"id":"2747433b9844df7b","repo":"deepseek-ai/deepseek-harness","slug":"client-api-endpoint-expected-contract-got","errorCode":null,"errorMessage":"client api: ${endpoint} expected ${contract}, got ${String(values.length)}","messagePattern":"client api: (.+?) expected (.+?), got (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/api/gateway/src/client/index.ts","lineNumber":374,"sourceCode":"  }\n\n  private async invoke(\n    descriptor: InvocationDescriptor,\n    projection: ScopedProjection | undefined,\n    token: MountToken,\n    callerCtx: Context,\n    values: readonly unknown[],\n    boundIdentity?: BoundContextIdentity,\n  ): Promise<RemoteResult<unknown>> {\n    const endpoint = endpointOf(descriptor)\n    if (!token.active) return withdrawn(endpoint)\n    const expected = descriptor.parameters.length - (projection?.parameterIndex === undefined ? 0 : 1)\n    const hasCallerSignal = descriptor.cancellation !== undefined && values.length === expected + 1\n    if (values.length !== expected && !hasCallerSignal) {\n      const contract = descriptor.cancellation === undefined\n        ? `${String(expected)} argument(s)`\n        : `${String(expected)} business argument(s) plus an optional AbortSignal`\n      throw new Error(\n        `client api: ${endpoint} expected ${contract}, got ${String(values.length)}`,\n      )\n    }\n    const args = Object.create(null) as Record<string, unknown>\n    if (projection !== undefined) {\n      const binder = boundIdentity === undefined\n        ? this.ownerCtx.typert.contexts.getClient(projection.context)\n        : undefined\n      if (boundIdentity === undefined && binder === undefined) {\n        throw new Error(`client api: ${endpoint} has no Client Context binder for ${JSON.stringify(projection.context)}`)\n      }\n      const identity = boundIdentity === undefined\n        ? binder?.identity(callerCtx)\n        : boundIdentity.value\n      if (identity === undefined) {\n        throw new Error(`client api: ${endpoint} requires a ${JSON.stringify(projection.context)} Context`)\n      }\n      args[projection.wire] = parse(projection.codec, identity, endpoint, projection.wire)","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/api/gateway/src/client/index.ts#L356-L392","documentation":"Error \"client api: ${endpoint} expected ${contract}, got ${String(values.length)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/api/gateway/src/client/index.ts:374 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass exactly the number of values the endpoint contract declares."],"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"}