diff --git a/ennstatus/api/model.py b/ennstatus/api/model.py --- a/ennstatus/api/model.py +++ b/ennstatus/api/model.py @@ -255,10 +255,13 @@ class Server: except: raise NotImplementedError - if data is not None: - self.flags = data.relays[0].flags - else: - raise NotImplementedError + try: + if data is not None: + self.flags = data.relays[0].flags + else: + raise NotImplementedError + except IndexError as e: + raise NotImplementedError from e def check_status(self):