[feat] Add gateway tools - Railway preview test#3789
[feat] Add gateway tools - Railway preview test#3789mmabrouk wants to merge 26 commits intoci/railway-preview-environmentsfrom
Conversation
…railway-preview-with-gateway-tools
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| raise ConnectionNotFoundError( | ||
| connection_slug=connection_slug, | ||
| detail="Connection has no provider connection ID.", | ||
| ) |
There was a problem hiding this comment.
🔴 ConnectionNotFoundError called with unsupported detail keyword argument causes TypeError
When a connection exists but has no provider_connection_id set, the code at api/oss/src/apis/fastapi/tools/router.py:917 raises ConnectionNotFoundError(connection_slug=connection_slug, detail="Connection has no provider connection ID."). However, ConnectionNotFoundError.__init__ (api/oss/src/core/tools/exceptions.py:23-30) only accepts provider_key, integration_key, connection_slug, and connection_id — it does not accept a detail keyword argument.
Root Cause
The ConnectionNotFoundError constructor signature is:
def __init__(
self,
*,
provider_key: Optional[str] = None,
integration_key: Optional[str] = None,
connection_slug: Optional[str] = None,
connection_id: Optional[str] = None,
):But the call site passes detail=... which is not one of the accepted keyword arguments. Since the constructor uses * (keyword-only), Python will raise TypeError: ConnectionNotFoundError.__init__() got an unexpected keyword argument 'detail'.
Impact: When a user calls a tool whose connection exists but has no provider_connection_id (e.g. a pending OAuth connection), instead of the intended 404 response, the server crashes with an unhandled TypeError which propagates as a 500 error.
| raise ConnectionNotFoundError( | |
| connection_slug=connection_slug, | |
| detail="Connection has no provider connection ID.", | |
| ) | |
| raise ConnectionNotFoundError( | |
| connection_slug=connection_slug, | |
| provider_key=provider_key, | |
| integration_key=integration_key, | |
| ) |
Was this helpful? React with 👍 or 👎 to provide feedback.
| action_response = await self.get_action( | ||
| request=request, | ||
| provider_key=provider_key, | ||
| integration_key=integration_key, | ||
| action_key=action.key, | ||
| full_details=full_details, | ||
| ) | ||
| if action_response.action: | ||
| items.append(action_response.action) | ||
| continue |
There was a problem hiding this comment.
🔴 list_actions crashes with AttributeError when get_action returns JSONResponse for a missing action
When full_details=True, the list_actions handler at api/oss/src/apis/fastapi/tools/router.py:464 calls self.get_action(...) for each action and then accesses action_response.action at line 471. However, get_action can return a JSONResponse (at line 534) when the action is not found. JSONResponse has no .action attribute, so this will raise an AttributeError.
Root Cause
The get_action method at api/oss/src/apis/fastapi/tools/router.py:533-537 returns a raw JSONResponse for not-found actions:
if not action:
return JSONResponse(
status_code=404,
content={"detail": "Action not found"},
)But the caller at line 464-472 assumes the return is always a ToolCatalogActionResponse:
action_response = await self.get_action(...)
if action_response.action: # AttributeError on JSONResponse
items.append(action_response.action)This can happen when the Composio list endpoint returns an action that the detail endpoint subsequently reports as missing (e.g. recently deprecated action, eventual consistency between Composio endpoints).
Impact: Any request to GET .../actions/?full_details=true where at least one action cannot be fetched individually will crash with an unhandled AttributeError, resulting in a 500 error instead of gracefully skipping the unavailable action.
| action_response = await self.get_action( | |
| request=request, | |
| provider_key=provider_key, | |
| integration_key=integration_key, | |
| action_key=action.key, | |
| full_details=full_details, | |
| ) | |
| if action_response.action: | |
| items.append(action_response.action) | |
| continue | |
| action_response = await self.get_action( | |
| request=request, | |
| provider_key=provider_key, | |
| integration_key=integration_key, | |
| action_key=action.key, | |
| full_details=full_details, | |
| ) | |
| if isinstance(action_response, ToolCatalogActionResponse) and action_response.action: | |
| items.append(action_response.action) | |
| continue |
Was this helpful? React with 👍 or 👎 to provide feedback.
Railway Preview Environment
Updated at 2026-02-19T20:01:51.763Z |
Summary
ci/railway-preview-environments(PR ci(railway): add Railway OSS deployment framework and preview environment CI #3787 - Railway CI framework)feat/add-gateway-toolsbranchPurpose
Validate the full Railway preview CI pipeline with a real feature branch (gateway tools + Composio integration).
What to check
/w,/api/health,/services/healthreturn 200add_tool_connections_table) runs cleanly