When a user deletes a document from Jive we call the "trashFile" resource on your service.
So what is the response you return for the "trashFile" request ?
If that is an error response then this is the cause for the unexpected error.
You can send a success response as if the file has been actually trashed.
Although a better solution would be to identify this situation (when you receive a request such as trash or download for a deleted file)
and re-send the delete notification to Jive.
You're right. I was sending an error response for the trash request.
The problem is that the information of the file is deleted, including the external ids of the file and / or version and the resources, so I cannot send a good success response because the external Ids will be empty and the version information will be missing.
If I can keep the external Ids, I can send a success response (with the external Ids and the resources), but the version information (content-type, file name and size) will be missing. However, if then the file is untrashed, should we send an error or send a success (with the available info)?
Keeping with the same scenario as described above, now I'm returning the following information when the last version of the file has been deleted from the ESP:
There is no version information included because we cannot obtain it, and the file information is generated based on the request.
It seems that Jive process the trash response correctly, but the problem now is that the file isn't recoverable so the "untrashFile" request will always fail with an error.
Is there any way to tell the Jive server that the file cannot be recovered without sending a notification? Is it a good idea to remove the "untrashFile" resource from the response?
There is no way to tell Jive the file no longer exists without sending a notification.
If you remove the "untrashFile" resource then in case the admin will try to restore the file from trash, the operation will fail because the resource doesn't exist and it should.
When identifying this situation, you should send the delete notification to Jive.
Lev Waisberg , Do you have another solution ?
nope. sounds right to me.