From 75964f9a0f882024105a79bc2c8105b7fb21afce Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:48:53 +0100 Subject: [PATCH] fixes testss --- .../workspaces/_exceptions_handlers.py | 8 ++++++-- .../simcore_service_webserver/workspaces/_trash_api.py | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/services/web/server/src/simcore_service_webserver/workspaces/_exceptions_handlers.py b/services/web/server/src/simcore_service_webserver/workspaces/_exceptions_handlers.py index f418e814169..f6470f461f7 100644 --- a/services/web/server/src/simcore_service_webserver/workspaces/_exceptions_handlers.py +++ b/services/web/server/src/simcore_service_webserver/workspaces/_exceptions_handlers.py @@ -7,7 +7,11 @@ HttpErrorInfo, create_exception_handlers_decorator, ) -from ..projects.exceptions import ProjectRunningConflictError, ProjectStoppingError +from ..projects.exceptions import ( + BaseProjectError, + ProjectRunningConflictError, + ProjectStoppingError, +) from .errors import ( WorkspaceAccessForbiddenError, WorkspaceGroupNotFoundError, @@ -44,6 +48,6 @@ handle_plugin_requests_exceptions = create_exception_handlers_decorator( - exceptions_catch=(WorkspacesValueError), + exceptions_catch=(BaseProjectError, WorkspacesValueError), exc_to_status_map=_TO_HTTP_ERROR_MAP, ) diff --git a/services/web/server/src/simcore_service_webserver/workspaces/_trash_api.py b/services/web/server/src/simcore_service_webserver/workspaces/_trash_api.py index ea1c4110859..18c3ae93b88 100644 --- a/services/web/server/src/simcore_service_webserver/workspaces/_trash_api.py +++ b/services/web/server/src/simcore_service_webserver/workspaces/_trash_api.py @@ -59,7 +59,7 @@ async def trash_workspace( ) # IMPLICIT trash - child_folders: list[FolderID] = [] # TODO: find children + child_folders: list[FolderID] = [] # TODO: find children. Check with MD for folder_id in child_folders: await trash_folder( @@ -70,7 +70,7 @@ async def trash_workspace( force_stop_first=force_stop_first, ) - child_projects: list[ProjectID] = [] # TODO: find children + child_projects: list[ProjectID] = [] # TODO: find children. Check with MD for project_id in child_projects: await trash_project( @@ -104,7 +104,7 @@ async def untrash_workspace( updates=WorkspaceUpdateDB(trashed=None, trashed_by=None), ) - child_folders: list[FolderID] = [] # TODO: find children + child_folders: list[FolderID] = [] # TODO: find children. Check with MD for folder_id in child_folders: await untrash_folder( @@ -114,7 +114,7 @@ async def untrash_workspace( folder_id=folder_id, ) - child_projects: list[ProjectID] = [] # TODO: find children + child_projects: list[ProjectID] = [] # TODO: find children. Check with MD for project_id in child_projects: await untrash_project(