# HG changeset patch # User Alain Mazy # Date 1585732123 -7200 # Node ID 38b0f51781aa0c570839f3c8289573a26d9a26f6 # Parent 320a2d2249024175d67100b72fa476ccb4f5ea3a improved error message when trying to execute a C-Find query that is not accepted by the remote modality diff -r 320a2d224902 -r 38b0f51781aa Core/DicomNetworking/DicomUserConnection.cpp --- a/Core/DicomNetworking/DicomUserConnection.cpp Wed Apr 01 10:15:33 2020 +0200 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Wed Apr 01 11:08:43 2020 +0200 @@ -736,9 +736,22 @@ { char buf[16]; sprintf(buf, "%04X", response.DimseStatus); - throw OrthancException(ErrorCode_NetworkProtocol, - "C-FIND SCU to AET \"" + remoteAet + - "\" has failed with DIMSE status 0x" + buf); + + if (response.DimseStatus == STATUS_FIND_Failed_UnableToProcess) + { + throw OrthancException(ErrorCode_NetworkProtocol, + HttpStatus_422_UnprocessableEntity, + "C-FIND SCU to AET \"" + remoteAet + + "\" has failed with DIMSE status 0x" + buf + + " (unable to process - invalid query ?)" + ); + } + else + { + throw OrthancException(ErrorCode_NetworkProtocol, + "C-FIND SCU to AET \"" + remoteAet + + "\" has failed with DIMSE status 0x" + buf); + } } }