Open LucaDiba opened 4 months ago
Ciao @LucaDiba! Sono Dosu, un bot qui per aiutarti a risolvere bug, rispondere alle tue domande e diventare un contributore mentre aspettiamo un manutentore umano. Sono qui per aiutarti con il tuo problema!
To resolve the issue of deleting a broken CalDAV integration in Cal.com when the calendars page shows an infinite loading interface and Cloudflare blocks the API calls, you can use the provided API endpoint directly. Here is a step-by-step guide on how to do it:
Identify the externalId
: Ensure you have the externalId
of the CalDAV integration. This is typically the URL of the CalDAV server.
URL Encode the externalId
: Since Cloudflare blocks the API calls due to the externalId
being a URL, you need to URL encode the externalId
to safely include it in the API request.
const externalId = "your-external-id";
const safeExternalId = encodeURIComponent(externalId);
Construct the API URL: Use the endpoint /v1/selected-calendars/{userId}_{integration}_{externalId}
with the appropriate values for userId
, integration
, and the URL-encoded externalId
.
Make a DELETE Request: Use a tool like curl
or Postman to make a DELETE request to the constructed URL. Ensure you include your API key in the query parameters.
Here is an example using curl
:
curl -X DELETE "https://your-calcom-instance.com/v1/selected-calendars/{userId}_{integration}_{safeExternalId}?apiKey=your_api_key"
Replace {userId}
, {integration}
, {safeExternalId}
, and your_api_key
with the actual values.
Here is an example of how you can construct and execute the DELETE request programmatically:
const axios = require('axios');
const userId = 'your_user_id';
const integration = 'caldav';
const externalId = 'your-external-id';
const safeExternalId = encodeURIComponent(externalId);
const apiKey = 'your_api_key';
const url = `https://your-calcom-instance.com/v1/selected-calendars/${userId}_${integration}_${safeExternalId}?apiKey=${apiKey}`;
axios.delete(url)
.then(response => {
console.log('Integration deleted successfully:', response.data);
})
.catch(error => {
console.error('Error deleting integration:', error.response ? error.response.data : error.message);
});
By following these steps, you should be able to delete the broken CalDAV integration and resolve the issue with the infinite loading interface on the calendars page.
To continue the conversation, mention @dosu.
Issue Summary
A while ago I added a CalDAV to Cal.com. Then, I deleted the CalDAV server, so all the requests made to that URL fail. Unfortunately, Cal.com doesn't handle this error and this leads to a 504 timeout error to be thrown when /calendars calls
connectedCalendars,integrations
. Also, even after the error is thrown, the /calendars page still shows a loading interface even though the call to the API returned an error.I'm currently unable to even delete the CalDAV since the calendars page doesn't work at all, and Cloudflare blocks the API calls to
DELETE /v1/selected-calendars/...
due to theexternalId
being an URL.Steps to Reproduce
Actual Results
Expected Results
Technical details
Evidence
CAL-3834