{"record":{"id":"2847b866b6edf300","repo":"deepseek-ai/deepseek-harness","slug":"client-api-endpoint-requires-a-json-stringif","errorCode":null,"errorMessage":"client api: ${endpoint} requires a ${JSON.stringify(projection.context)} Context","messagePattern":"client api: (.+?) requires a (.+?) Context","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/api/gateway/src/client/index.ts","lineNumber":390,"sourceCode":"        ? `${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)\n    }\n    let valueIndex = 0\n    descriptor.parameters.forEach((parameter, parameterIndex) => {\n      if (parameterIndex === projection?.parameterIndex) return\n      const value = parse(parameter.codec, values[valueIndex], endpoint, parameter.wire)\n      if (value !== undefined) args[parameter.wire] = value\n      valueIndex += 1\n    })\n    const connection = this.ownerCtx.get('connection') as ConnectionHandle | undefined\n    if (connection === undefined) throw new Error(`client api: ${endpoint} has no active Connection`)\n    const callerSignal = hasCallerSignal ? values[expected] as AbortSignal | undefined : undefined\n    const signal = callerSignal === undefined\n      ? token.abort.signal\n      : AbortSignal.any([token.abort.signal, callerSignal])\n    try {\n      const result = await connection.rpc.call('/api', endpoint, { args }, signal)","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/api/gateway/src/client/index.ts#L372-L408","documentation":"Error \"client api: ${endpoint} requires a ${JSON.stringify(projection.context)} Context\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/api/gateway/src/client/index.ts:390 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the Context the projection requires before calling the endpoint."],"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"}