Skip to content

Commit e867391

Browse files
committed
Fixes wronge exception in api-server
1 parent 0c5929a commit e867391

File tree

1 file changed

+3
-3
lines changed
  • services/api-server/src/simcore_service_api_server/api/dependencies

1 file changed

+3
-3
lines changed

services/api-server/src/simcore_service_api_server/api/dependencies/rabbitmq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
from fastapi import Depends, FastAPI
55
from pydantic import NonNegativeInt
6-
from servicelib.aiohttp.application_setup import ApplicationSetupError
76
from servicelib.fastapi.dependencies import get_app
87
from servicelib.rabbitmq import RabbitMQClient
98
from servicelib.rabbitmq._client_rpc import RabbitMQRPCClient
109
from tenacity import before_sleep_log, retry, stop_after_delay, wait_fixed
1110

11+
from ...exceptions.custom_errors import ApplicationSetupError
1212
from ...services_http.log_streaming import LogDistributor
1313

1414
_MAX_WAIT_FOR_LOG_DISTRIBUTOR_SECONDS: Final[int] = 10
@@ -17,7 +17,7 @@
1717

1818

1919
def get_rabbitmq_rpc_client(
20-
app: Annotated[FastAPI, Depends(get_app)]
20+
app: Annotated[FastAPI, Depends(get_app)],
2121
) -> RabbitMQRPCClient:
2222
assert app.state.rabbitmq_rpc_client # nosec
2323
return cast(RabbitMQRPCClient, app.state.rabbitmq_rpc_client)
@@ -42,7 +42,7 @@ def get_log_distributor(app: Annotated[FastAPI, Depends(get_app)]) -> LogDistrib
4242
async def wait_till_log_distributor_ready(app) -> None:
4343
if not hasattr(app.state, "log_distributor"):
4444
msg = f"Api server's log_distributor was not ready within {_MAX_WAIT_FOR_LOG_DISTRIBUTOR_SECONDS=} seconds"
45-
raise ApplicationSetupError(msg)
45+
raise ApplicationSetupError(tip=msg)
4646

4747

4848
def get_log_check_timeout(app: Annotated[FastAPI, Depends(get_app)]) -> NonNegativeInt:

0 commit comments

Comments
 (0)