feat(backend): standardize service health checks with UnhealthyServiceError (#10584)

This commit is contained in:
Zamil Majdy
2025-08-08 17:23:36 +07:00
parent e8f897ead1
commit 5338ab5b80

View File

@@ -98,8 +98,10 @@ class RemoteCallError(BaseModel):
class UnhealthyServiceError(ValueError):
def __init__(self, message: str = "Service is unhealthy", log: bool = True):
msg = f"[{get_service_name()}] - please check the service health."
def __init__(
self, message: str = "Service is unhealthy or not ready", log: bool = True
):
msg = f"[{get_service_name()}] - {message}"
super().__init__(msg)
self.message = msg
if log: