Error: Code 500 Error When Pausing a Connection
Issue
When you use the Modify a Connection endpoint to pause an active connection, a PATCH request to https://api.fivetran.com/v1/connections/{id} with the body {"paused": true} takes about 60 seconds and returns the following error:
Request failed with status code 500
However, the connection appears paused in the Fivetran dashboard.
Environment
- Fivetran REST API
- All connectors
Resolution
To troubleshoot this issue, send a GET request to /v1/connections/{id} to verify the connection's state.
- If the connection is paused, no further action is required.
- If the connection isn't paused, wait a few minutes, then retry the
PATCHrequest.
Retrying the PATCH request doesn't affect a connection that is already paused. For automated or batch operations, implement error handling that checks whether the connection is paused before retrying the request.
If your orchestrator times out before the API responds, increase its timeout setting where possible.
Cause
This issue occurs when Fivetran pauses a connection while a long-running query is still in progress. Canceling the query may exceed the REST API's 60-second timeout, resulting in the above error, even though the pause operation completes successfully.