zeroclaw-labs/zeroclaw · error
Composio v3 auth config lookup failed: {err}
Error message
Composio v3 auth config lookup failed: {err} What it means
resolve_auth_config_id translates an app name into an auth config id via GET {v3}/auth_configs?toolkit_slug={app}&show_disabled=true&limit=25 before minting a connection link, and this error means that lookup returned non-2xx. Reached from action='connect' when auth_config_id is omitted; the Tool wrapper surfaces it as 'Failed to get connection URL: Composio v3 auth config lookup failed: ...'.
Source
Thrown at crates/zeroclaw-tools/src/composio.rs:526
async fn resolve_auth_config_id(&self, app_name: &str) -> anyhow::Result<String> {
let url = format!("{COMPOSIO_API_BASE_V3}/auth_configs");
let resp = self
.client()
.get(&url)
.header("x-api-key", &self.api_key)
.query(&[
("toolkit_slug", app_name),
("show_disabled", "true"),
("limit", "25"),
])
.send()
.await?;
if !resp.status().is_success() {
let err = response_error(resp).await;
anyhow::bail!("Composio v3 auth config lookup failed: {err}");
}
let body: ComposioAuthConfigsResponse = resp
.json()
.await
.context("Failed to decode Composio v3 auth configs response")?;
if body.items.is_empty() {
anyhow::bail!(
"No auth config found for toolkit '{app_name}'. Create one in Composio first."
);
}
let preferred = body
.items
.iter()
.find(|cfg| cfg.is_enabled())
.or_else(|| body.items.first())View on GitHub (pinned to 88bb9c8533)
Solutions
- Check the embedded HTTP code: 401 -> fix composio.api_key and verify with action='list'.
- Use the exact Composio toolkit slug for app (confirm it via action='list').
- Bypass the lookup by passing auth_config_id explicitly.
- On 429/5xx, back off and retry.
Example fix
// before: typo'd app slug makes the auth_configs lookup fail
let args = json!({"action": "connect", "app": "githb"});
// after: exact toolkit slug
let args = json!({"action": "connect", "app": "github", "entity_id": "alice"}); Defensive patterns
Strategy: retry
Validate before calling
// Confirm the app exists in the catalog before connect-by-app
let actions = tool.list_actions(Some(app)).await?;
if actions.is_empty() {
anyhow::bail!("unknown Composio app '{app}'; connect cannot resolve an auth config");
} Type guard
fn is_toolkit_slug(s: &str) -> bool {
let t = s.trim();
!t.is_empty()
&& t.chars().all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-')
} Try / catch
match tool.execute(json!({"action": "connect", "app": app})).await {
Ok(r) if r.success => { /* open redirect_url */ }
Ok(r) => {
let e = r.error.unwrap_or_default();
if ["HTTP 429", "HTTP 500", "HTTP 502", "HTTP 503", "HTTP 504"].iter().any(|c| e.contains(c)) {
// retry after backoff (idempotent GET underneath)
}
}
Err(_) => { /* transport error */ }
} Prevention
- Validate app slugs against action='list' before connect
- Keep the API key current; probe with action='list' at startup
- Pass auth_config_id directly when you know it, skipping the lookup
When it happens
Trigger: connect-by-app with an invalid or revoked x-api-key (401); a toolkit_slug value the workspace cannot resolve (400/404); rate limiting (429); Composio 5xx.
Common situations: Wrong or rotated composio.api_key; app slug typos (normalize_app_slug fixes case and underscores, but 'githb' still fails); workspace permission issues on organization accounts.
Related errors
- Composio v3 API error: {err}
- Composio v3 connected accounts lookup failed: {err}
- Composio v3 connect failed: {err}
- Embedding API error {status}: {text}
- Composio v3 action execution failed: {err}
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/f1a9093249716845.
Report an issue: GitHub.