Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 12:00 UTC
fix(docs): Add fallback for reference source loading failure
If getReferenceSource() fails, fall back to sync referenceSource (MDX only) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sohamganatra committed
Jan 28, 2026 at 00:31 UTC
0d84fd09c3cf569ea0c2d422d78a92826c72c8de
1 file changed
+8
-1
docs/app/llms.mdx/[[...slug]]/route.ts
+8
-1
@@ -434,7 +434,14 @@ export async function GET(
434
// eslint-disable-next-line @typescript-eslint/no-explicit-any
435
let pageSource: any;
436
if (prefix === 'reference') {
437
- pageSource = await getReferenceSource();
437
+ try {
438
+ pageSource = await getReferenceSource();
439
+ } catch (e) {
440
+ console.error('Error loading reference source:', e);
441
+ // Fall back to MDX-only reference source if OpenAPI loading fails
442
+ const { referenceSource } = await import('@/lib/source');
443
+ pageSource = referenceSource;
444
+ }
445
} else {
446
const match = sources.find((s) => s.prefix === prefix);
447
if (!match) notFound();