Mercurial > hg > orthanc
changeset 3798:c38b82bb6fd3
improved error message when trying to C-Move a resource that is not found
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 01 Apr 2020 10:14:49 +0200 |
parents | 6cd4b7724c3d |
children | 320a2d224902 |
files | Core/DicomNetworking/DicomUserConnection.cpp |
diffstat | 1 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomUserConnection.cpp Tue Mar 10 09:49:18 2020 +0100 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Wed Apr 01 10:14:49 2020 +0200 @@ -887,9 +887,22 @@ { char buf[16]; sprintf(buf, "%04X", response.DimseStatus); - throw OrthancException(ErrorCode_NetworkProtocol, - "C-MOVE SCU to AET \"" + remoteAet_ + - "\" has failed with DIMSE status 0x" + buf); + + if (response.DimseStatus == STATUS_MOVE_Failed_UnableToProcess) + { + throw OrthancException(ErrorCode_NetworkProtocol, + HttpStatus_422_UnprocessableEntity, + "C-MOVE SCU to AET \"" + remoteAet_ + + "\" has failed with DIMSE status 0x" + buf + + " (unable to process - resource not found ?)" + ); + } + else + { + throw OrthancException(ErrorCode_NetworkProtocol, + "C-MOVE SCU to AET \"" + remoteAet_ + + "\" has failed with DIMSE status 0x" + buf); + } } }