0.3.11 with curl_cffi as optional tls extra (FreeBSD support)
This commit is contained in:
33
garminconnect/exceptions.py
Normal file
33
garminconnect/exceptions.py
Normal file
@ -0,0 +1,33 @@
|
||||
from typing import Any
|
||||
|
||||
|
||||
class GarminConnectConnectionError(Exception):
|
||||
"""Raised when communication ended in error.
|
||||
|
||||
``response`` carries the original HTTP response when the error wraps an
|
||||
HTTP failure, so callers can inspect status codes and bodies.
|
||||
"""
|
||||
|
||||
response: Any = None
|
||||
|
||||
|
||||
class GarminConnectNotFoundError(GarminConnectConnectionError):
|
||||
"""Raised when a requested resource does not exist (HTTP 404).
|
||||
|
||||
Subclasses GarminConnectConnectionError for backwards compatibility, so
|
||||
existing ``except GarminConnectConnectionError`` handlers keep working while
|
||||
callers can now catch a missing resource specifically (e.g. deleting an
|
||||
already-deleted workout).
|
||||
"""
|
||||
|
||||
|
||||
class GarminConnectTooManyRequestsError(Exception):
|
||||
"""Raised when rate limit is exceeded."""
|
||||
|
||||
|
||||
class GarminConnectAuthenticationError(Exception):
|
||||
"""Raised when authentication is failed."""
|
||||
|
||||
|
||||
class GarminConnectInvalidFileFormatError(Exception):
|
||||
"""Raised when an invalid file format is provided."""
|
||||
Reference in New Issue
Block a user