mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
feat(backend): standardize service health checks with UnhealthyServiceError (#10584)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user