We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7487c5c commit 22cfcebCopy full SHA for 22cfceb
1 file changed
fullykiosk/__init__.py
@@ -142,6 +142,10 @@ async def get(self, **kwargs):
142
)
143
raise FullyKioskError(response.status, await response.text())
144
145
- data = await response.json(content_type="text/html")
+ try:
146
+ data = await response.json()
147
+ except aiohttp.client_exceptions.ContentTypeError:
148
+ data = await response.json(content_type="text/html")
149
+
150
_LOGGER.debug(json.dumps(data))
151
return data
0 commit comments