Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
debug: Return error details instead of 500
sohamganatrae2756293aced
diff --git a/docs/app/llms.mdx/[[...slug]]/route.ts b/docs/app/llms.mdx/[[...slug]]/route.tsindex 1958b6e97..87b81af14 100644--- a/docs/app/llms.mdx/[[...slug]]/route.ts+++ b/docs/app/llms.mdx/[[...slug]]/route.ts@@ -512,10 +512,12 @@ export async function GET(throw e;}console.error('Unexpected error in llms.mdx route:', e);+ const errorMessage = e instanceof Error ? e.message : String(e);+ const errorStack = e instanceof Error ? e.stack : '';return new Response(- '# Error\n\nAn error occurred while generating the markdown content.',+ `# Error\n\nAn error occurred while generating the markdown content.\n\n**Error:** ${errorMessage}\n\n**Stack:**\n\`\`\`\n${errorStack}\n\`\`\``,{- status: 500,+ status: 200, // Return 200 so we can see the errorheaders: {'Content-Type': 'text/markdown; charset=utf-8',},