[BitBucket user: Alain Mazy] [BitBucket date: 2018-12-26.12:28:55] The job actually succeeds but, to return the HTTP response, we're trying to look in the job history to get the state of the job. Since history size is 0, it is not found -> 500 of course, same problem happens with /media too.
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2018-12-28.08:09:38] This is the expected behavior if the asynchronous mode is used: If the job history size is 0, the state of a job is "lost" as soon as it succeeds or fails. Either set the job history size to 1, or use the synchronous mode for creating archives.
[BitBucket user: Alain Mazy] [BitBucket date: 2018-12-28.08:54:26] Well, the problem is that this happens when using the Orthanc Explorer and users don't get their files ! So I would say we should: - update Orthanc Explorer to use the synchronous mode - return a 400 with a nice error message when trying to use the asynchronous mode when JobsHistorySize is 0.
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2018-12-28.09:59:39] This is very strange, as synchronous mode is the default mode to preserve backward compatibility, and as Orthanc Explorer does not specify "Synchronous" or "Asynchronous" in their body request: https://hg.orthanc-server.com/orthanc/file/b89a4288d60521c924be884141d490d7ed938bef/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp#L103 Looks like an issue within the Orthanc core. I would say that we need: 1. Understand why synchronous mode is not the default, and fix this. 2. Indeed, report 404 on expired jobs => this should be introduced as a separate issue.
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2019-01-24.15:47:13] Fix issue #119 (/patients/.../archive returns a 500 when JobsHistorySize is 0) → https://hg.orthanc-server.com/orthanc/changeset/94a4f75cc746