Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Account delete method calls do not resolve promises #15

Open
mjtodd opened this issue Nov 4, 2020 · 4 comments
Open

Account delete method calls do not resolve promises #15

mjtodd opened this issue Nov 4, 2020 · 4 comments

Comments

@mjtodd
Copy link

mjtodd commented Nov 4, 2020

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

@fsworld009
Copy link
Contributor

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

@fsworld009
Copy link
Contributor

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.

@mjtodd
Copy link
Author

mjtodd commented Nov 6, 2020

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

@fsworld009
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants