Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion librelinkup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def append_reading(points, data, reading):

data = response.json()
if not 'authTicket' in data['data']:
logging.error("Authentication failed")
logging.error("Authentication failed. Server response:")
logging.info(data)
if 'redirect' in data['data'] and data['data']['redirect'] is True:
region = data['data']['region']
logging.error(f"The LibreLinkUp API returned a redirect. You should try the following url for LIBRELINKUP_URL in config.py: https://api-{region}.libreview.io")
sys.exit(1)

with open(auth_token_path, 'w') as outfile:
Expand Down