Skip to content

Commit b4035d5

Browse files
committed
@sanderegg review: rename error
1 parent 6797b92 commit b4035d5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/service-library/src/servicelib/rabbitmq/rpc_interfaces/catalog/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class CatalogForbiddenError(CatalogApiBaseError):
1313
msg_template = "Insufficient access rights for {name}"
1414

1515

16-
class CatalogServiceError(CatalogApiBaseError):
16+
class CatalogNotAvailableError(CatalogApiBaseError):
1717
msg_template = "Catalog service failed unexpectedly"

services/web/server/src/simcore_service_webserver/catalog/_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from servicelib.aiohttp.requests_validation import handle_validation_as_http_error
2727
from servicelib.rabbitmq._errors import RPCServerError
2828
from servicelib.rabbitmq.rpc_interfaces.catalog import services as catalog_rpc
29-
from servicelib.rabbitmq.rpc_interfaces.catalog.errors import CatalogServiceError
29+
from servicelib.rabbitmq.rpc_interfaces.catalog.errors import CatalogNotAvailableError
3030
from servicelib.rest_constants import RESPONSE_MODEL_POLICY
3131

3232
from ..constants import RQ_PRODUCT_KEY, RQT_USERID_KEY
@@ -128,7 +128,7 @@ async def batch_get_my_services(
128128
ids=services_ids,
129129
)
130130
except RPCServerError as err:
131-
raise CatalogServiceError(
131+
raise CatalogNotAvailableError(
132132
user_id=user_id,
133133
product_name=product_name,
134134
) from err

services/web/server/src/simcore_service_webserver/projects/_common/exceptions_handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from servicelib.rabbitmq.rpc_interfaces.catalog.errors import (
77
CatalogForbiddenError,
88
CatalogItemNotFoundError,
9-
CatalogServiceError,
9+
CatalogNotAvailableError,
1010
)
1111

1212
from ...exception_handling import (
@@ -164,7 +164,7 @@
164164

165165

166166
_OTHER_ERRORS: ExceptionToHttpErrorMap = {
167-
CatalogServiceError: HttpErrorInfo(
167+
CatalogNotAvailableError: HttpErrorInfo(
168168
status.HTTP_503_SERVICE_UNAVAILABLE,
169169
"This service is currently not available",
170170
),

0 commit comments

Comments
 (0)