<?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: Error, When using Batch Operation in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730167#M32285</link>
    <description>&lt;P&gt;Yes, I make Custom Snap Using API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2023 13:06:57 GMT</pubDate>
    <dc:creator>Aadi12</dc:creator>
    <dc:date>2023-11-16T13:06:57Z</dc:date>
    <item>
      <title>Error, When using Batch Operation</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730149#M32283</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;BR /&gt;When I use batch operation like Create folder in batch&lt;BR /&gt;The operation perform but it show this kind of error&amp;nbsp;&lt;BR /&gt;Indivisual operation like Create folder, Copy File is working fine and&amp;nbsp;give the JSON also but in Batch operation this error&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cannot convert to JSON, detail: Invalid tag: required Tag.COMPLETE, but was Tag.ASYNC_JOB_ID (through reference chain: com.dropbox.core.v2.files.CreateFolderBatchLaunch["completeValue"])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 18:31:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730149#M32283</guid>
      <dc:creator>Aadi12</dc:creator>
      <dc:date>2023-11-16T18:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error, When using Batch Operation</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730152#M32284</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1766097"&gt;@Aadi12&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Error, When using Batch Operation&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is this something you're doing through the Dropbox API? If so, I'll move your post to the appropriate section for help with the API.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 12:43:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730152#M32284</guid>
      <dc:creator>Rich</dc:creator>
      <dc:date>2023-11-16T12:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error, When using Batch Operation</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730167#M32285</link>
      <description>&lt;P&gt;Yes, I make Custom Snap Using API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 13:06:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730167#M32285</guid>
      <dc:creator>Aadi12</dc:creator>
      <dc:date>2023-11-16T13:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error, When using Batch Operation</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730227#M32289</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1766097"&gt;@Aadi12&lt;/a&gt; It looks like you're using &lt;A href="https://github.com/dropbox/dropbox-sdk-java" target="_blank"&gt;the Dropbox Java SDK&lt;/A&gt; to create some folders. When using &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/DbxUserFilesRequests.html#createFolderBatch(java.util.List)" target="_self"&gt;createFolderBatch&lt;/A&gt; or &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/DbxUserFilesRequests.html#createFolderBatchBuilder(java.util.List)" target="_self"&gt;createFolderBatchBuilder&lt;/A&gt; functionality, the resulting &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/CreateFolderBatchLaunch.html" target="_blank"&gt;CreateFolderBatchLaunch&lt;/A&gt; may indicate either "launch an asynchronous job or complete synchronously". That being the case, you'll need to check which type it is before attempting to use it as that type.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error you're getting indicates that you're calling &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/CreateFolderBatchLaunch.html#getCompleteValue()" target="_self"&gt;CreateFolderBatchLaunch.getCompleteValue&lt;/A&gt; on an object that isn't tagged as "complete". You should call &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/CreateFolderBatchLaunch.html#isComplete()" target="_self"&gt;CreateFolderBatchLaunch.isComplete&lt;/A&gt; first; only if that returns true should you then use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/CreateFolderBatchLaunch.html#getCompleteValue()" target="_self"&gt;CreateFolderBatchLaunch.getCompleteValue&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;You should likewise use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/CreateFolderBatchLaunch.html#isAsyncJobId()" target="_self"&gt;CreateFolderBatchLaunch.isAsyncJobId&lt;/A&gt; to check if it is instead an async job ID, and if so then use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/CreateFolderBatchLaunch.html#getAsyncJobIdValue()" target="_self"&gt;CreateFolderBatchLaunch.getAsyncJobIdValue&lt;/A&gt; to get the value and use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v5.4.3/com/dropbox/core/v2/files/DbxUserFilesRequests.html#createFolderBatchCheck(java.lang.String)" target="_self"&gt;createFolderBatchCheck&lt;/A&gt; to check on the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you're doing something like this:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;CreateFolderBatchLaunch createFolderBatchLaunch = client.files().createFolderBatch(foldersToCreate);&lt;/LI-CODE&gt;
&lt;P&gt;Then just doing this would be incorrect, since you're not checking if the object is actually "complete" first:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;System.out.println(createFolderBatchLaunch.getCompleteValue());&lt;/LI-CODE&gt;
&lt;P&gt;Instead, you need to do something like this:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;if (createFolderBatchLaunch.isComplete()) {
    System.out.println(createFolderBatchLaunch.getCompleteValue());
    // handle completed operation as desired...
} else if (createFolderBatchLaunch.isAsyncJobId()) {
    System.out.println(createFolderBatchLaunch.getAsyncJobIdValue());
    // use createFolderBatchCheck to poll for the job status...
} else {
    // fallback behavior...
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 15:58:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730227#M32289</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-11-16T15:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error, When using Batch Operation</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730266#M32295</link>
      <description>&lt;P&gt;Thank you !. Error have resolved&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 18:22:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-When-using-Batch-Operation/m-p/730266#M32295</guid>
      <dc:creator>Aadi12</dc:creator>
      <dc:date>2023-11-16T18:22:56Z</dc:date>
    </item>
  </channel>
</rss>

