<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: createSharedLinkWithSettings() falls with shared_link_already_exist error in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588447#M27395</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/108837"&gt;@Itai M.&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please check what causes this failure and suggest the proper way to handle this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/108837"&gt;@Itai M.&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; You question is little bit philosophical. Main subpart of your question could be is there some failure at all?!&lt;/P&gt;&lt;P&gt;In general software exception is a way some function/method (or generally code piece) to return alternative result to calling code. What will be this alternative result? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; Could be anything. Very common is such result to be used as error/failure signal, but this is not mandatory. Interpretation of such alternative result is matter of context. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;In your particular case the "failure" is preexistence of the link your are trying to create. Is this a real failure or something acceptable? 🧐 It depends on your application design (i.e. your desire).&lt;/P&gt;&lt;P&gt;How can you handle that? If according to your initial idea preexistence of such link is unexpected..., one way&amp;nbsp; is to signal to the user, for example. Otherwise, you can catch the exception and pop wanted result out from there - there is a "metadata" field matching exactly the normal result when this type of exception gets catch (from that point on you can continue normal application flow). &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; So finally... the choice is yours.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2022 12:24:59 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2022-04-05T12:24:59Z</dc:date>
    <item>
      <title>createSharedLinkWithSettings() falls with shared_link_already_exist error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588406#M27393</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We're using the following code to create shared links:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;sharingClient: &lt;SPAN&gt;DbxUserSharingRequests&lt;BR /&gt;sharingClient.createSharedLinkWithSettings(path)&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;DroboxCore SDK version: &lt;STRONG&gt;5.1.1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Request ID:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;aa92c91cb979457d85ffa03c89a6c4d0&lt;BR /&gt;b54e559b95224839a25673ad461de91f&lt;BR /&gt;41011827be2a495c897617aa2c2b5a23&lt;BR /&gt;042a000666cb4e1d81722459ad4ce27a&lt;BR /&gt;339205393d704ecc81389bdf845a3e7c&lt;BR /&gt;2fbe2808ee604453806e8bea59a030a1&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Error:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;com.dropbox.core.v2.sharing.CreateSharedLinkWithSettingsErrorException: Exception in 2/sharing/create_shared_link_with_settings: {".tag":"shared_link_already_exists","shared_link_already_exists"&lt;/STRONG&gt;:{".tag":"metadata","metadata":{".tag":"file","url":"&lt;A href="https://www.dropbox.com/s/hsk98qywlluod1l/mb_tbm_bogo_sawi-48d-treadmill-stories-testboosttahe22-bogo_visa.mov?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/hsk98qywlluod1l/mb_tbm_bogo_sawi-48d-treadmill-stories-testboosttahe22-bogo_visa.mov?dl=0&lt;/A&gt;","name":"mb_tbm_bogo_sawi-48d-treadmill-stories-testboosttahe22-bogo_visa.mov","link_permissions":{"can_revoke":true,"resolved_visibility":"public","requested_visibility":"public"},"client_modified":"2022-04-04T15:13:04Z","server_modified":"2022-04-04T17:23:42Z","rev":"5dbd763cdaea07ecc7ab1","size":8076679,"id":"id:9gZdgY3Xx4wAAAAAAAAkbw","path_lower":"/media buying main/sculptnation/test boost ads/sam/tb_sawi-048/mb_tbm_bogo_sawi-48d-treadmill-stories-testboosttahe22-bogo_visa.mov"}}} at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:481) at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:502) at&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you please check what causes this failure and suggest the proper way to handle this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 01:01:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588406#M27393</guid>
      <dc:creator>Itai M.</dc:creator>
      <dc:date>2022-04-06T01:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: createSharedLinkWithSettings() falls with shared_link_already_exist error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588447#M27395</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/108837"&gt;@Itai M.&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please check what causes this failure and suggest the proper way to handle this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/108837"&gt;@Itai M.&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; You question is little bit philosophical. Main subpart of your question could be is there some failure at all?!&lt;/P&gt;&lt;P&gt;In general software exception is a way some function/method (or generally code piece) to return alternative result to calling code. What will be this alternative result? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; Could be anything. Very common is such result to be used as error/failure signal, but this is not mandatory. Interpretation of such alternative result is matter of context. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;In your particular case the "failure" is preexistence of the link your are trying to create. Is this a real failure or something acceptable? 🧐 It depends on your application design (i.e. your desire).&lt;/P&gt;&lt;P&gt;How can you handle that? If according to your initial idea preexistence of such link is unexpected..., one way&amp;nbsp; is to signal to the user, for example. Otherwise, you can catch the exception and pop wanted result out from there - there is a "metadata" field matching exactly the normal result when this type of exception gets catch (from that point on you can continue normal application flow). &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; So finally... the choice is yours.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 12:24:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588447#M27395</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-04-05T12:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: createSharedLinkWithSettings() falls with shared_link_already_exist error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588495#M27402</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/108837"&gt;@Itai M.&lt;/a&gt; That's correct, if there's already a shared link for the item, you'll get that 'shared_link_already_exists' error. You can catch and handle that exception as needed. You can also use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v4.0.1/com/dropbox/core/v2/sharing/DbxUserSharingRequests.html#listSharedLinks--" target="_self"&gt;listSharedLinks&lt;/A&gt; to check for/list existing shared links. &lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 15:26:16 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/createSharedLinkWithSettings-falls-with-shared-link-already/m-p/588495#M27402</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2022-04-05T15:26:16Z</dc:date>
    </item>
  </channel>
</rss>

