diff --git a/fullykiosk/__init__.py b/fullykiosk/__init__.py index 412dd9a..ce228a4 100644 --- a/fullykiosk/__init__.py +++ b/fullykiosk/__init__.py @@ -142,6 +142,10 @@ async def get(self, **kwargs): ) raise FullyKioskError(response.status, await response.text()) - data = await response.json(content_type="text/html") + try: + data = await response.json() + except aiohttp.client_exceptions.ContentTypeError: + data = await response.json(content_type="text/html") + _LOGGER.debug(json.dumps(data)) return data