comparison OrthancServer/OrthancRestApi/OrthancRestApi.cpp @ 3240:e44e0127e553

Fix issue #134 (/patient/modify gives 500, should really be 400)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 Feb 2019 17:26:45 +0100
parents 784bbb03fb54
children 962e5f00744b
comparison
equal deleted inserted replaced
3239:407e1a188105 3240:e44e0127e553
248 } 248 }
249 249
250 if (synchronous) 250 if (synchronous)
251 { 251 {
252 Json::Value successContent; 252 Json::Value successContent;
253 if (context.GetJobsEngine().GetRegistry().SubmitAndWait 253 context.GetJobsEngine().GetRegistry().SubmitAndWait
254 (successContent, raii.release(), priority)) 254 (successContent, raii.release(), priority);
255 { 255
256 // Success in synchronous execution 256 // Success in synchronous execution
257 output.AnswerJson(successContent); 257 output.AnswerJson(successContent);
258 }
259 else
260 {
261 // Error during synchronous execution
262 output.SignalError(HttpStatus_500_InternalServerError);
263 }
264 } 258 }
265 else 259 else
266 { 260 {
267 // Asynchronous mode: Submit the job, but don't wait for its completion 261 // Asynchronous mode: Submit the job, but don't wait for its completion
268 std::string id; 262 std::string id;