{"record":{"id":"8d0779b734739cb9","repo":"ComposioHQ/composio","slug":"proxy-execute-endpoint-is-required","errorCode":null,"errorMessage":"proxy_execute: endpoint is required","messagePattern":"proxy_execute: endpoint is required","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"python/composio/core/models/session_context.py","lineNumber":56,"sourceCode":"    client: HttpClient,\n    session_id: str,\n    *,\n    toolkit: str,\n    endpoint: str,\n    method: t.Literal[\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"],\n    body: t.Any = None,\n    parameters: t.Optional[t.List[t.Dict[str, t.Any]]] = None,\n) -> ToolRouterSessionProxyExecuteResponse:\n    \"\"\"Shared proxy execute implementation used by SessionContextImpl and ToolRouterSession.\n\n    Projects the generated client's response model onto the SDK's own shape so\n    the public return type does not move when the client is regenerated.\n    \"\"\"\n    # Client-side validation (matches TS SessionProxyExecuteParamsSchema)\n    if not toolkit:\n        raise ValidationError(\"proxy_execute: toolkit is required\")\n    if not endpoint:\n        raise ValidationError(\"proxy_execute: endpoint is required\")\n    if method not in _VALID_METHODS:\n        raise ValidationError(\n            f\"proxy_execute: method must be one of {sorted(_VALID_METHODS)}, got {method!r}\"\n        )\n\n    # Transform and validate parameters\n    api_params: t.List[Parameter] = []\n    if parameters:\n        for i, p in enumerate(parameters):\n            if not isinstance(p, dict) or \"name\" not in p or \"value\" not in p:\n                raise ValidationError(\n                    f\"proxy_execute: parameters[{i}] must be a dict with 'name' and 'value' keys\"\n                )\n            param_type = p.get(\"in\", p.get(\"type\", \"header\"))\n            if param_type not in _VALID_PARAM_TYPES:\n                raise ValidationError(\n                    f\"proxy_execute: parameters[{i}].type must be 'header' or 'query', \"\n                    f\"got {param_type!r}\"","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/python/composio/core/models/session_context.py#L38-L74","documentation":"Client-side guard in proxy_execute that fires when endpoint is falsy. Checked after toolkit, so a valid toolkit with a missing endpoint hits this one. No API call is made — the error is purely local validation matching the TS schema.","triggerScenarios":"Calling session.proxy_execute(toolkit='github') with endpoint=None or '' — commonly when the endpoint is interpolated from a variable or config that wasn't populated.","commonSituations":"Endpoint paths built from templates where the placeholder substitution produced an empty string.","solutions":["Supply a concrete endpoint path like '/user' or '/repos/{owner}/{repo}'","Validate the endpoint variable is non-empty before the call"],"exampleFix":"# before\nsession.proxy_execute(toolkit='github', endpoint=ep)  # ep == ''\n\n# after\nif not ep:\n    raise ValueError('endpoint must be set')\nsession.proxy_execute(toolkit='github', endpoint=ep)","handlingStrategy":"validation","validationCode":"if not endpoint:\n    raise ValueError('endpoint is required')","typeGuard":"def has_endpoint(p: dict) -> bool:\n    return bool(p.get('endpoint'))","tryCatchPattern":null,"preventionTips":["Assert non-empty interpolated endpoints"],"tags":["python","session","validation","proxy"],"backgroundTag":"missing-required-parameter","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}