changeset 5771:4db9f897df58 find-refactoring

fix for DICOMWeb + PG tests
author Alain Mazy <am@orthanc.team>
date Wed, 11 Sep 2024 16:31:11 +0200
parents e2771185dad6
children 093a8693ba16
files OrthancServer/Sources/Database/Compatibility/GenericFind.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/Compatibility/GenericFind.cpp	Mon Sep 09 16:43:47 2024 +0200
+++ b/OrthancServer/Sources/Database/Compatibility/GenericFind.cpp	Wed Sep 11 16:31:11 2024 +0200
@@ -401,7 +401,7 @@
 
       if (level != request.GetLevel())
       {
-        throw OrthancException(ErrorCode_DatabasePlugin);
+        throw OrthancException(ErrorCode_UnknownResource, "Wrong resource level for this ID");  // this might happen e.g if you call /instances/... with a series instance id
       }
 
       std::unique_ptr<FindResponse::Resource> resource(new FindResponse::Resource(request.GetLevel(), internalId, identifier));