# HG changeset patch # User am@osimis.io # Date 1543412096 -3600 # Node ID aeeb40a35ce19ab142db6f9054bc4e5cb7a57da1 # Parent 00504dcc996f09a843d9f5782e9e4250c3326b22 /image-uint16: return 404 instead of unsupported.png when instance is not found diff -r 00504dcc996f -r aeeb40a35ce1 OrthancServer/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Thu Nov 15 11:35:35 2018 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Wed Nov 28 14:34:56 2018 +0100 @@ -529,7 +529,7 @@ } catch (OrthancException& e) { - if (e.GetErrorCode() == ErrorCode_ParameterOutOfRange) + if (e.GetErrorCode() == ErrorCode_ParameterOutOfRange || e.GetErrorCode() == ErrorCode_UnknownResource) { // The frame number is out of the range for this DICOM // instance, the resource is not existent @@ -544,6 +544,7 @@ call.GetOutput().Redirect(root + "app/images/unsupported.png"); } + return; } ImageToEncode image(decoded, mode, invert);