From 6a87dd66092e265d217fd65be7f85a078fa87816 Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Wed, 18 Dec 2024 14:07:57 +0100 Subject: [PATCH] improve error handling --- .../folders/_exceptions_handlers.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/web/server/src/simcore_service_webserver/folders/_exceptions_handlers.py b/services/web/server/src/simcore_service_webserver/folders/_exceptions_handlers.py index 5d98db3647d..8b571562c8d 100644 --- a/services/web/server/src/simcore_service_webserver/folders/_exceptions_handlers.py +++ b/services/web/server/src/simcore_service_webserver/folders/_exceptions_handlers.py @@ -8,7 +8,11 @@ exception_handling_decorator, to_exceptions_handlers_map, ) -from ..projects.exceptions import ProjectRunningConflictError, ProjectStoppingError +from ..projects.exceptions import ( + ProjectInvalidRightsError, + ProjectRunningConflictError, + ProjectStoppingError, +) from ..workspaces.errors import ( WorkspaceAccessForbiddenError, WorkspaceFolderInconsistencyError, @@ -53,6 +57,10 @@ status.HTTP_409_CONFLICT, "Invalid folder value set: {reason}", ), + ProjectInvalidRightsError: HttpErrorInfo( + status.HTTP_403_FORBIDDEN, + "Access Denied: You do not have permission to move the project with UUID: {project_uuid}. Tip: Copy and paste the UUID into the search bar to locate the project.", + ), # Trashing ProjectRunningConflictError: HttpErrorInfo( status.HTTP_409_CONFLICT,