comparison OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 2935:aeeb40a35ce1

/image-uint16: return 404 instead of unsupported.png when instance is not found
author am@osimis.io
date Wed, 28 Nov 2018 14:34:56 +0100
parents 9d277f8ad698
children 4767d36679ed
comparison
equal deleted inserted replaced
2932:00504dcc996f 2935:aeeb40a35ce1
527 } 527 }
528 } 528 }
529 } 529 }
530 catch (OrthancException& e) 530 catch (OrthancException& e)
531 { 531 {
532 if (e.GetErrorCode() == ErrorCode_ParameterOutOfRange) 532 if (e.GetErrorCode() == ErrorCode_ParameterOutOfRange || e.GetErrorCode() == ErrorCode_UnknownResource)
533 { 533 {
534 // The frame number is out of the range for this DICOM 534 // The frame number is out of the range for this DICOM
535 // instance, the resource is not existent 535 // instance, the resource is not existent
536 } 536 }
537 else 537 else
542 root += "../"; 542 root += "../";
543 } 543 }
544 544
545 call.GetOutput().Redirect(root + "app/images/unsupported.png"); 545 call.GetOutput().Redirect(root + "app/images/unsupported.png");
546 } 546 }
547 return;
547 } 548 }
548 549
549 ImageToEncode image(decoded, mode, invert); 550 ImageToEncode image(decoded, mode, invert);
550 551
551 HttpContentNegociation negociation; 552 HttpContentNegociation negociation;