diff --git a/src/APIHandler.py b/src/APIHandler.py index 3bcef72..414772d 100644 --- a/src/APIHandler.py +++ b/src/APIHandler.py @@ -33,6 +33,8 @@ class APIHandler: raise ConnectionError(f"Invalid API key or authentication method.") case 404: raise ConnectionError(f"404: Not Found. This means there's no resource with this elabid (wrong elabid?) on your eLabFTW (wrong endpoint?).") + case 400: + raise ConnectionError(f"400: Bad Request. This means the API endpoint you tried to reach is invalid. Did you tamper with the source code? If not, contact the developer.") case _: raise ConnectionError(f"HTTP request failed with status code: {response.status_code} (NOTE: 4xx means user's fault).") else: