During an uninstall
When a workspace uninstalls your app, Attio removes the connection even if the handler fails:- If the handler throws, Attio calls it again, for a maximum of 5 attempts. The minimum time between attempts is 30 seconds. After the last attempt, Attio removes the connection.
- If the handler runs for longer than the 30-second server function timeout, Attio stops it. Unlike a throw, a timeout is not retried: Attio removes the connection.
- In two cases, the handler cannot run, so Attio removes the connection without it and your
cleanup does not happen:
- The member who created the connection is not an active member of the workspace now. The handler runs as this member.
- The OAuth access token of the connection is expired, and Attio cannot refresh it. The handler cannot use the connection.
Example
Here’s an example that cleans up a webhook handler.TypeScript