Why java.lang.Object exception is thrown in mergeAndDownload Task OR API? How to prevent it?

Why java.lang.Object exception is thrown in mergeAndDownload Task or API? How to prevent it?

Reason: 

  1. This error will be thrown when the Writer server cannot return the merged file within 40 secs. Because, deluge execution time limit is only 40 seconds for each API.
  2. Whereas, 'MergeAndDownload' operation cannot be completed within 40 sec as it needs to undergo file conversion process (which depends on the file size). 

Solution:

  1. 'MergeAndDownload' task has been deprecated; hence, it is not possible to use it in deluge script.
  2. As an alternative, you can use MergeAndStore task or API and store the merged document in Zoho Workdrive.
Info
Merge and Store task will not work for Zoho Creator service users. Please use the deluge script provided in the Merge and Store API.