Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
debug: Return error details instead of 500
sohamganatra committed
Jan 27, 2026 at 23:48 UTC
e2756293aced611c4586a830177469becf509596
1 file changed
+4
-2
docs/app/llms.mdx/[[...slug]]/route.ts
+4
-2
@@ -512,10 +512,12 @@ export async function GET(
512
throw e;
513
}
514
console.error('Unexpected error in llms.mdx route:', e);
515
+ const errorMessage = e instanceof Error ? e.message : String(e);
516
+ const errorStack = e instanceof Error ? e.stack : '';
517
return new Response(
516
- '# Error\n\nAn error occurred while generating the markdown content.',
518
+ `# Error\n\nAn error occurred while generating the markdown content.\n\n**Error:** ${errorMessage}\n\n**Stack:**\n\`\`\`\n${errorStack}\n\`\`\``,
519
{
518
- status: 500,
520
+ status: 200, // Return 200 so we can see the error
521
headers: {
522
'Content-Type': 'text/markdown; charset=utf-8',
523
},