From 4c7c78c815a08f6c9dc96a229b70a1e05e99b1b4 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 8 Jul 2022 17:18:05 -0400 Subject: [PATCH] Add a `ApplicationLogError` custom exc instead --- piker/data/_ahab.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/piker/data/_ahab.py b/piker/data/_ahab.py index d04d73a2..45203447 100644 --- a/piker/data/_ahab.py +++ b/piker/data/_ahab.py @@ -37,7 +37,7 @@ from docker.models.containers import Container as DockerContainer from docker.errors import ( DockerException, APIError, - ContainerError, + # ContainerError, ) from requests.exceptions import ConnectionError, ReadTimeout @@ -51,6 +51,10 @@ class DockerNotStarted(Exception): 'Prolly you dint start da daemon bruh' +class ApplicationLogError(Exception): + 'App in container reported an error in logs' + + @acm async def open_docker( url: Optional[str] = None, @@ -153,7 +157,7 @@ class Container: # print(f'level: {level}') if level in ('error', 'fatal'): - raise ContainerError(msg) + raise ApplicationLogError(msg) if patt in msg: return True