error message includes missing item case

This commit is contained in:
2026-04-24 10:37:10 +02:00
parent 1523c973f4
commit 038f1920ba

View File

@@ -30,7 +30,7 @@ class APIHandler:
elif response.status_code // 100 == 4: elif response.status_code // 100 == 4:
match response.status_code: match response.status_code:
case 401|403: case 401|403:
raise ConnectionError(f"Invalid API key or authentication method.") raise ConnectionError(f"Invalid API key, authentication method or elabid. Check if an item with ID = {elabid} actually exists.")
case 404: case 404:
raise ConnectionError(f"404: Not Found. This means there's no resource with this elabid (wrong elabid?) on your eLabFTW (wrong endpoint?).") raise ConnectionError(f"404: Not Found. This means there's no resource with this elabid (wrong elabid?) on your eLabFTW (wrong endpoint?).")
case 400: case 400: