We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Slawek
8 years agoNew member | Level 2
shared_link_already_exists just after list_shared_links returned nothing
I maintain an application which uploads files submitted by users and creates a shared link to them. In most cases it works properly, but today one call to create_shared_link_with_settings returned 4...
Greg-DB
8 years agoDropbox Staff
While it's technically possible the race condition occurred in this case (i.e., the link was created by some other client in between your two calls to list_shared_links and create_shared_link_with_settings), that is relatively unlikely given the short time span you indicated.
Is it possible your app called create_shared_link_with_settings twice somehow though? E.g., as an automatic retry in response to a network failure? That could cause this.
In any case though, you should implement error handling in your app for the shared_link_already_exists error, regardless of the timing of a previous call to list_shared_links.
Is it possible your app called create_shared_link_with_settings twice somehow though? E.g., as an automatic retry in response to a network failure? That could cause this.
In any case though, you should implement error handling in your app for the shared_link_already_exists error, regardless of the timing of a previous call to list_shared_links.
- Slawek8 years agoNew member | Level 2
I call list_shared_links and create_shared_link_with_settings in the same function, so the first should discover any shared links created earlier, no matter how. That's my idea for this code ;).
In fact I have added this option only as a precaution, because the same function also uploads the file with autorename, so I don't expect any shared link for this file to exist.
Unless this error can be caused by sharing of the parent folder. Of course it would still be a race condition, which is very unprobable .
Is it possible to get shared_link_already_exists on the file just because a parent folder is shared?
- Greg-DB8 years agoDropbox Staff
Even though you call list_shared_links and create_shared_link_with_settings in the same function, there's still a race condition between the two calls, so you should make sure your call to create_shared_link_with_settings can always handle the possibility of a shared_link_already_exists error.
No, having a parent folder shared wouldn't cause a shared_link_already_exists error for a file in that folder.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!