Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Jul 4, 2024
1 parent 60b55db commit a049295
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/howitz/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
from datetime import datetime, timezone, timedelta

from werkzeug.exceptions import BadRequest, InternalServerError, MethodNotAllowed
from zinolib.controllers.zino1 import Zino1EventManager, RetryError, EventClosedError, UpdateHandler, LostConnectionError
from zinolib.controllers.zino1 import Zino1EventManager, UpdateHandler
from zinolib.controllers.zino1 import RetryError, EventClosedError, LostConnectionError, NotConnectedError
from zinolib.event_types import Event, AdmState, PortState, BFDState, ReachabilityState, LogEntry, HistoryEntry
from zinolib.compat import StrEnum
from zinolib.ritz import AuthenticationError
Expand Down Expand Up @@ -201,7 +202,7 @@ def update_events():
if current_app.updater is None:
try:
connect_to_updatehandler()
except AuthenticationError as e:
except NotConnectedError as e:
raise LostConnectionError("Could not establish connection to UpdateHandler") from e
updated = current_app.updater.get_event_update()
if not updated:
Expand All @@ -215,7 +216,7 @@ def refresh_current_events():
if current_app.updater is None:
try:
connect_to_updatehandler()
except AuthenticationError as e:
except NotConnectedError as e:
raise LostConnectionError("Could not establish connection to UpdateHandler") from e

event_ids = update_events()
Expand Down

0 comments on commit a049295

Please sign in to comment.