Skip to content

Commit

Permalink
Merge pull request #843 from mkmer/content-type-error
Browse files Browse the repository at this point in the history
Catch `ContentTypeError` in 2FA
  • Loading branch information
fronzbot authored Jan 4, 2024
2 parents 864de67 + 64af647 commit 3912eef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blinkpy/auth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Login handler for blink."""
import logging
from aiohttp import ClientSession, ClientConnectionError
from aiohttp import ClientSession, ClientConnectionError, ContentTypeError
from blinkpy import api
from blinkpy.helpers import util
from blinkpy.helpers.constants import (
Expand Down Expand Up @@ -220,7 +220,7 @@ async def send_auth_key(self, blink, key):
if not blink.available:
_LOGGER.error("%s", json_resp["message"])
return False
except (KeyError, TypeError):
except (KeyError, TypeError, ContentTypeError):
_LOGGER.error("Did not receive valid response from server.")
return False
return True
Expand Down

0 comments on commit 3912eef

Please sign in to comment.