Kloudless/kloudless-js

Account delete method calls do not resolve promises

Opened this issue · 4 comments

I am seeing the get/patch methods work fine, but with the delete method (when deleting a calendar event), the promise returned by the delete function does not resolve.

Interestingly it does resolve if the event has already been deleted, and returns an error as expected, but does not resolve where the event does exist and the deletion is successful

Hi @mjtodd thanks for the report, we will take a look and will let you know if we have any finding, thanks.

Hi @mjtodd

We tested the SDK and cannot reproduce this, the delete calendar request is successful with 204 status code and the Promise is resolved as expected. If you are still running to this issue:

  1. When you delete calendar events, does the API request itself responded with 204? You should be able to check this when you use Javascript SDK in browser and check the Network tab in browser developer console.
  2. Could you provide your code snippet to use the Javascript SDK to delete the calendar event? You can mask any sensitive information like account token and APIKey.
  3. Which calendar service are you connecting to?

Thanks.

Hi @fsworld009
I am using this server-side in node.js, so can't see the network response for that.
The code for this is :

const account = new Account({token: kloudlessCalendarToken})
await account.delete({
          url:'/cal/calendars/primary/events/'+id,
        })

This is connecting to a Google calendar

Hi:

I tested with Nodejs environment and a Google Calendar account and still cannot reproduce this, the delete request Promise is resolved as expected. I'm assuming it might be related to the specific account / calendar you are using. To troubleshoot this further, we would need to access your account to run some tests.

If you agree to let us access your account temporarily, please provide the account ID (you could get that information by calling account.get() and check id property in the response data)

If you do not want to disclose this information publicly, feel free to send a support ticket to support@kloudless.com instead, we could also troubleshoot further via the support channel as well.