Skip to content

Commit 3912eef

Browse files
authored
Merge pull request #843 from mkmer/content-type-error
Catch `ContentTypeError` in 2FA
2 parents 864de67 + 64af647 commit 3912eef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blinkpy/auth.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Login handler for blink."""
22
import logging
3-
from aiohttp import ClientSession, ClientConnectionError
3+
from aiohttp import ClientSession, ClientConnectionError, ContentTypeError
44
from blinkpy import api
55
from blinkpy.helpers import util
66
from blinkpy.helpers.constants import (
@@ -220,7 +220,7 @@ async def send_auth_key(self, blink, key):
220220
if not blink.available:
221221
_LOGGER.error("%s", json_resp["message"])
222222
return False
223-
except (KeyError, TypeError):
223+
except (KeyError, TypeError, ContentTypeError):
224224
_LOGGER.error("Did not receive valid response from server.")
225225
return False
226226
return True

0 commit comments

Comments
 (0)