diff OrthancServer/Sources/ServerContext.cpp @ 5296:5053a10da5a2

Fix orphan files remaining in storage when working with MaximumStorageSize
author Alain Mazy <am@osimis.io>
date Mon, 22 May 2023 15:00:01 +0200
parents a7d95f951f8a
children f26ed26a7793 03501a258d9e
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp	Wed May 10 12:52:35 2023 +0200
+++ b/OrthancServer/Sources/ServerContext.cpp	Mon May 22 15:00:01 2023 +0200
@@ -688,8 +688,12 @@
             break;
 
           case StoreStatus_Failure:
-            LOG(ERROR) << "Store failure";
-            break;
+            LOG(ERROR) << "Unknown store failure";
+            throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError);
+
+          case StoreStatus_StorageFull:
+            LOG(ERROR) << "Storage full";
+            throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage);
 
           default:
             // This should never happen