Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Nov 20, 2024
1 parent 018ad58 commit 5d30429
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@
status.HTTP_409_CONFLICT,
"Invalid folder value set: {reason}",
),
# Trashing
ProjectRunningConflictError: HttpErrorInfo(
status.HTTP_409_CONFLICT,
"One or more studies in this folder are in use and cannot be trashed. Please stop all services first and try again",
),
ProjectStoppingError: HttpErrorInfo(
status.HTTP_503_SERVICE_UNAVAILABLE,
"Something went wrong while stopping services before trashing. Aborting trash.",
"Something went wrong while stopping running services in studies within this folder before trashing. Aborting trash.",
),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
HttpErrorInfo,
create_exception_handlers_decorator,
)
from ..projects.exceptions import ProjectRunningConflictError, ProjectStoppingError
from .errors import (
WorkspaceAccessForbiddenError,
WorkspaceGroupNotFoundError,
Expand All @@ -30,6 +31,15 @@
status.HTTP_404_NOT_FOUND,
"Workspace not found. {reason}",
),
# Trashing
ProjectRunningConflictError: HttpErrorInfo(
status.HTTP_409_CONFLICT,
"One or more studies in this workspace are in use and cannot be trashed. Please stop all services first and try again",
),
ProjectStoppingError: HttpErrorInfo(
status.HTTP_503_SERVICE_UNAVAILABLE,
"Something went wrong while stopping running services in studies within this workspace before trashing. Aborting trash.",
),
}


Expand Down

0 comments on commit 5d30429

Please sign in to comment.