We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ba47c1 commit 73c9b2bCopy full SHA for 73c9b2b
glances_api/__init__.py
@@ -47,6 +47,11 @@ async def get_data(self, endpoint):
47
except httpx.ConnectError:
48
raise exceptions.GlancesApiConnectionError(f"Connection to {url} failed")
49
50
+ if response.status_code == httpx.codes.UNAUTHORIZED:
51
+ raise exceptions.GlancesApiAuthorizationError(
52
+ "Please check your credentials"
53
+ )
54
+
55
if response.status_code == httpx.codes.OK:
56
try:
57
_LOGGER.debug(response.json())
0 commit comments