# HG changeset patch # User Alain Mazy # Date 1758191801 -7200 # Node ID a84bf2926cc33cee258bde9d8bba018bc07dfeca # Parent 6ce5e7b44afcf924ff64f32f89bafd6e84e04692 DimseErrorStatus in C-Move diff -r 6ce5e7b44afc -r a84bf2926cc3 NEWS --- a/NEWS Thu Sep 18 10:05:21 2025 +0200 +++ b/NEWS Thu Sep 18 12:36:41 2025 +0200 @@ -11,8 +11,10 @@ REST API -------- -* C-Store and C-Get jobs and HTTP responses now include a new "DimseErrorStatus" field if - the operation fails. +* Fix: C-Get SCU jobs or HTTP responses were always successfull even if the C-Get operation + actually failed. +* C-Store, C-Move and C-Get jobs and HTTP responses now include a new "DimseErrorStatus" + field if the operation fails. Maintenance diff -r 6ce5e7b44afc -r a84bf2926cc3 OrthancFramework/Sources/OrthancException.cpp --- a/OrthancFramework/Sources/OrthancException.cpp Thu Sep 18 10:05:21 2025 +0200 +++ b/OrthancFramework/Sources/OrthancException.cpp Thu Sep 18 12:36:41 2025 +0200 @@ -102,6 +102,26 @@ OrthancException::OrthancException(ErrorCode errorCode, HttpStatus httpStatus, const std::string& details, + uint16_t dimseErrorStatus, + bool log) : + errorCode_(errorCode), + httpStatus_(httpStatus), + logged_(log), + details_(new std::string(details)), + hasDimseErrorStatus_(true), + dimseErrorStatus_(dimseErrorStatus) + { +#if ORTHANC_ENABLE_LOGGING == 1 + if (log) + { + LOG(ERROR) << EnumerationToString(errorCode_) << ": " << details; + } +#endif + } + + OrthancException::OrthancException(ErrorCode errorCode, + HttpStatus httpStatus, + const std::string& details, bool log) : errorCode_(errorCode), httpStatus_(httpStatus), diff -r 6ce5e7b44afc -r a84bf2926cc3 OrthancFramework/Sources/OrthancException.h --- a/OrthancFramework/Sources/OrthancException.h Thu Sep 18 10:05:21 2025 +0200 +++ b/OrthancFramework/Sources/OrthancException.h Thu Sep 18 12:36:41 2025 +0200 @@ -70,6 +70,12 @@ const std::string& details, bool log = true); + OrthancException(ErrorCode errorCode, + HttpStatus httpStatus, + const std::string& details, + uint16_t dimseErrorStatus, + bool log = true); + ErrorCode GetErrorCode() const; HttpStatus GetHttpStatus() const;