REST-API Query - HttpDescribeErrors no effect

Hi all,

for some reasons setting HttpDescribeErrors to ‘true’ has no effect when doing a C-FIND query against the REST API.
I tried it on 3 different Orthanc servers (2x Ubuntu, 1x Mac OSX latest download from Osimis) and always got an HTTP BAD REQUEST with an empty response body but no description of the error.

Normal example:

$ curl -vk -X POST http://me:secret@localhost:8042/modalities/MYPACS/query -d @- << EOF

{“Query”:{“StudyID”:““,“StudyDate”:””,“StudyDescription”:““,“AccessionNumber”:””,“PatientName”:“DOE*”,“StudyInstanceUID”:“*”},“Level”:“Study”}

EOF

< HTTP/1.1 200 OK

< Content-Type: application/json; charset=utf-8

< Content-Length: 114

<

{

“ID” : “4B7C74A4-9363-4482-ACF2-68903F70EFA7”,

“Path” : “/queries/4B7C74A4-9363-4482-ACF2-68903F70EFA7”

}

Broken JSON example (note the missing quotes around PatientName):

$ curl -vk -X POST http://me:secret@localhost:8042/modalities/MYPACS/query -d @- << EOF

{“Query”:{“StudyID”:““,“StudyDate”:””,“StudyDescription”:““,“AccessionNumber”:””,PatientName:“DOE*”,“StudyInstanceUID”:“*”},“Level”:“Study”}

EOF

< HTTP/1.1 400 Bad Request

< Content-Length: 0

I would have expected to get some description of the error in the response body of the broken example.
HttpDescribeErrors is set to true in the config file.

The makes it really hard to debug C-FIND queries. Any ideas?

Felix

Hello,

This is fixed by the following changeset:
https://bitbucket.org/sjodogne/orthanc/commits/f687e11aeb1364066fc156fce1a0775fdb293df3

For instance (missing quote before PatientName):

$ curl -v -X POST http://localhost:8042/modalities/self/query -d ‘{“Query”:{PatientName":“*”},“Level”:“Study”}’

< HTTP/1.1 400 Bad Request

< Connection: keep-alive
< Content-Length: 260
<
{
“Details” : “Must provide a JSON object”,
“HttpError” : “Bad Request”,
“HttpStatus” : 400,
“Message” : “Bad file format”,
“Method” : “POST”,
“OrthancError” : “Bad file format”,
“OrthancStatus” : 15,
“Uri” : “/modalities/self/query”
}

HTH,
Sébastien-