deepseek-ai/deepseek-harness · error · Error

client api: ${endpoint} requires a ${JSON.stringify(projecti

Error message

client api: ${endpoint} requires a ${JSON.stringify(projection.context)} Context

What it means

Error "client api: ${endpoint} requires a ${JSON.stringify(projection.context)} Context" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/api/gateway/src/client/index.ts:390

        ? `${String(expected)} argument(s)`
        : `${String(expected)} business argument(s) plus an optional AbortSignal`
      throw new Error(
        `client api: ${endpoint} expected ${contract}, got ${String(values.length)}`,
      )
    }
    const args = Object.create(null) as Record<string, unknown>
    if (projection !== undefined) {
      const binder = boundIdentity === undefined
        ? this.ownerCtx.typert.contexts.getClient(projection.context)
        : undefined
      if (boundIdentity === undefined && binder === undefined) {
        throw new Error(`client api: ${endpoint} has no Client Context binder for ${JSON.stringify(projection.context)}`)
      }
      const identity = boundIdentity === undefined
        ? binder?.identity(callerCtx)
        : boundIdentity.value
      if (identity === undefined) {
        throw new Error(`client api: ${endpoint} requires a ${JSON.stringify(projection.context)} Context`)
      }
      args[projection.wire] = parse(projection.codec, identity, endpoint, projection.wire)
    }
    let valueIndex = 0
    descriptor.parameters.forEach((parameter, parameterIndex) => {
      if (parameterIndex === projection?.parameterIndex) return
      const value = parse(parameter.codec, values[valueIndex], endpoint, parameter.wire)
      if (value !== undefined) args[parameter.wire] = value
      valueIndex += 1
    })
    const connection = this.ownerCtx.get('connection') as ConnectionHandle | undefined
    if (connection === undefined) throw new Error(`client api: ${endpoint} has no active Connection`)
    const callerSignal = hasCallerSignal ? values[expected] as AbortSignal | undefined : undefined
    const signal = callerSignal === undefined
      ? token.abort.signal
      : AbortSignal.any([token.abort.signal, callerSignal])
    try {
      const result = await connection.rpc.call('/api', endpoint, { args }, signal)

View on GitHub (pinned to b150a551b8)

Solutions

  1. Provide the Context the projection requires before calling the endpoint.

When it happens

Trigger: Thrown at packages/api/gateway/src/client/index.ts:390 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/2847b866b6edf300. Report an issue: GitHub.