Skip to content

Commit

Permalink
Add a custom error for code "0110"
Browse files Browse the repository at this point in the history
Resolves sampsyo/hass-smartthinq#109, which
reports this interpretation of this error code.
  • Loading branch information
sampsyo committed May 12, 2022
1 parent 267a880 commit 511e342
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions wideq/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ class InvalidRequestError(APIError):
"""The server rejected a request as invalid."""


class AgreementError(APIError):
"""The user needs to manually log in again to agree to new terms and
conditions.
"""


class MonitorError(APIError):
"""Monitoring a device failed, possibly because the monitoring
session failed and needs to be restarted.
Expand All @@ -180,6 +186,7 @@ def __init__(self, data):
"0102": NotLoggedInError,
"0106": NotConnectedError,
"0100": FailedRequestError,
"0110": AgreementError,
9000: InvalidRequestError, # Surprisingly, an integer (not a string).
9003: NotLoggedInError, # Session Creation FailureError
}
Expand Down

0 comments on commit 511e342

Please sign in to comment.