|
8 | 8 | exception_handling_decorator, |
9 | 9 | to_exceptions_handlers_map, |
10 | 10 | ) |
11 | | -from ..projects.exceptions import ProjectRunningConflictError, ProjectStoppingError |
12 | | -from .errors import ( |
13 | | - WorkspaceAccessForbiddenError, |
14 | | - WorkspaceGroupNotFoundError, |
15 | | - WorkspaceNotFoundError, |
16 | | -) |
| 11 | +from .errors import LicenseGoodNotFoundError |
17 | 12 |
|
18 | 13 | _logger = logging.getLogger(__name__) |
19 | 14 |
|
20 | 15 |
|
21 | 16 | _TO_HTTP_ERROR_MAP: ExceptionToHttpErrorMap = { |
22 | | - WorkspaceGroupNotFoundError: HttpErrorInfo( |
23 | | - status.HTTP_404_NOT_FOUND, |
24 | | - "Workspace {workspace_id} group {group_id} not found.", |
25 | | - ), |
26 | | - WorkspaceAccessForbiddenError: HttpErrorInfo( |
27 | | - status.HTTP_403_FORBIDDEN, |
28 | | - "Does not have access to this workspace", |
29 | | - ), |
30 | | - WorkspaceNotFoundError: HttpErrorInfo( |
| 17 | + LicenseGoodNotFoundError: HttpErrorInfo( |
31 | 18 | status.HTTP_404_NOT_FOUND, |
32 | | - "Workspace not found. {reason}", |
33 | | - ), |
34 | | - # Trashing |
35 | | - ProjectRunningConflictError: HttpErrorInfo( |
36 | | - status.HTTP_409_CONFLICT, |
37 | | - "One or more studies in this workspace are in use and cannot be trashed. Please stop all services first and try again", |
38 | | - ), |
39 | | - ProjectStoppingError: HttpErrorInfo( |
40 | | - status.HTTP_503_SERVICE_UNAVAILABLE, |
41 | | - "Something went wrong while stopping running services in studies within this workspace before trashing. Aborting trash.", |
42 | | - ), |
| 19 | + "Market item {license_good_id} not found.", |
| 20 | + ) |
43 | 21 | } |
44 | 22 |
|
45 | 23 |
|
|
0 commit comments