From 3a4f049053d13b613adc14a1b9afaaa509627932 Mon Sep 17 00:00:00 2001 From: Maciej Skarysz Date: Tue, 21 May 2024 15:46:34 +0800 Subject: [PATCH] improved message if APIKEY is invalid --- flow360/cloud/http_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow360/cloud/http_util.py b/flow360/cloud/http_util.py index 36c8f60d4..74deef783 100644 --- a/flow360/cloud/http_util.py +++ b/flow360/cloud/http_util.py @@ -63,7 +63,9 @@ def wrapper(*args, **kwargs): raise Flow360WebError(f"Web {args[1]}: Bad request error: {resp.json()['error']}") if resp.status_code == 401: - raise Flow360AuthorisationError("Unauthorized.") + raise Flow360AuthorisationError( + f"Unauthorized. Seems your APIKEY is invalid. Check it on {Env.current.web_url} in account section." + ) if resp.status_code == 404: raise Flow360WebNotFoundError(f"Web {args[1]}: Not found error: {resp.json()}")