diff OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.cpp @ 1758:4ee11b8773e2

Better error description in case of network json payload errors
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 26 Apr 2021 20:41:38 +0200
parents 28979b77ce90
children a03260db8835
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.cpp	Mon Apr 26 17:37:54 2021 +0200
+++ b/OrthancStone/Sources/Loaders/OrthancMultiframeVolumeLoader.cpp	Mon Apr 26 20:41:38 2021 +0200
@@ -92,7 +92,7 @@
         
       if (body.type() != Json::objectValue)
       {
-        throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol);
+        throw Orthanc::OrthancException(Orthanc::ErrorCode_BadJson, "JSON body should be an object value");
       }
 
       std::unique_ptr<Orthanc::DicomMap> dicom(new Orthanc::DicomMap);