Skip to content

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): guard nullable redirectUrl in expiry events guide

Sushmithamallesh1861d274accb
diff --git a/docs/content/docs/subscribing-to-connection-expiry-events.mdx b/docs/content/docs/subscribing-to-connection-expiry-events.mdx
index c4e38ac6c..664d5ada4 100644
--- a/docs/content/docs/subscribing-to-connection-expiry-events.mdx
+++ b/docs/content/docs/subscribing-to-connection-expiry-events.mdx
@@ -104,7 +104,9 @@ export default async function webhookHandler(req: NextApiRequest, res: NextApiRe
// Look up the user and send them a re-auth link
const session = await composio.create(lookupUser(accountId));
const connectionRequest = await session.authorize(toolkit);
- notifyUser(connectionRequest.redirectUrl);
+ if (connectionRequest.redirectUrl) {
+ notifyUser(connectionRequest.redirectUrl);
+ }
} else if (payload.type === 'composio.trigger.message') {
// Handle trigger events