mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Treat Huawei LTE error code 100006 as unsupported functionality (#54253)
Internet says 100006 could mean "parameter error", B2368-F20 is reported to respond with that to lan/HostInfo requests. While at it, handle the special case error codes and the "real" not supported exception in the same block. Closes https://github.com/home-assistant/core/issues/53280
This commit is contained in:
parent
28e421dc53
commit
9947795068
@ -185,11 +185,6 @@ class Router:
|
|||||||
_LOGGER.debug("Getting %s for subscribers %s", key, self.subscriptions[key])
|
_LOGGER.debug("Getting %s for subscribers %s", key, self.subscriptions[key])
|
||||||
try:
|
try:
|
||||||
self.data[key] = func()
|
self.data[key] = func()
|
||||||
except ResponseErrorNotSupportedException:
|
|
||||||
_LOGGER.info(
|
|
||||||
"%s not supported by device, excluding from future updates", key
|
|
||||||
)
|
|
||||||
self.subscriptions.pop(key)
|
|
||||||
except ResponseErrorLoginRequiredException:
|
except ResponseErrorLoginRequiredException:
|
||||||
if isinstance(self.connection, AuthorizedConnection):
|
if isinstance(self.connection, AuthorizedConnection):
|
||||||
_LOGGER.debug("Trying to authorize again")
|
_LOGGER.debug("Trying to authorize again")
|
||||||
@ -206,7 +201,13 @@ class Router:
|
|||||||
)
|
)
|
||||||
self.subscriptions.pop(key)
|
self.subscriptions.pop(key)
|
||||||
except ResponseErrorException as exc:
|
except ResponseErrorException as exc:
|
||||||
if exc.code != -1:
|
if not isinstance(
|
||||||
|
exc, ResponseErrorNotSupportedException
|
||||||
|
) and exc.code not in (
|
||||||
|
# additional codes treated as unusupported
|
||||||
|
-1,
|
||||||
|
100006,
|
||||||
|
):
|
||||||
raise
|
raise
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
"%s apparently not supported by device, excluding from future updates",
|
"%s apparently not supported by device, excluding from future updates",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user