@devries-cameron20 / composio-1 / commits / d59e03762
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): Add array validation to prevent crash on malformed API response

Sushmithamallesh committed Jan 22, 2026 at 20:09 UTC d59e0376296e4d60dca26b16339527cc956df665
1 file changed +2 -1
docs/app/(home)/toolkits/[[...slug]]/page.tsx
+2 -1
@@ -38,7 +38,8 @@ async function fetchDetailedTools(toolkitSlug: string): Promise<Tool[] | null> {
38 }
39
40 const data = await response.json();
41 - const items = data.items || data || [];
41 + const rawItems = data.items || data;
42 + const items = Array.isArray(rawItems) ? rawItems : [];
43
44 return items.map((tool: any) => {
45 // Extract parameters from JSON Schema format