Exceptions

exception pylibrelinkup.exceptions.AuthenticationError[source]

Bases: PyLibreLinkUpError

Raised when authentication fails.

exception pylibrelinkup.exceptions.EmailVerificationError[source]

Bases: PyLibreLinkUpError

Raised when the user needs to verify their email.

exception pylibrelinkup.exceptions.LLUAPIError(response_code, message)[source]

Bases: PyLibreLinkUpError

Raised when the LibreLinkUp API returns an error.

exception pylibrelinkup.exceptions.LLUAPIRateLimitError(response_code, message, retry_after=None)[source]

Bases: LLUAPIError

Raised when the LibreLinkUp API returns a rate limit error.

retry_after: int | None
exception pylibrelinkup.exceptions.PatientNotFoundError[source]

Bases: PyLibreLinkUpError

Raised when a patient with the provided patient_id is not found.

exception pylibrelinkup.exceptions.PrivacyPolicyError[source]

Bases: PyLibreLinkUpError

Raised when the user needs to accept the privacy policy.

exception pylibrelinkup.exceptions.PyLibreLinkUpError[source]

Bases: Exception

Base class for PyLibreLinkUp exceptions.

exception pylibrelinkup.exceptions.RedirectError(region)[source]

Bases: PyLibreLinkUpError

Raised when a redirect is encountered during authentication. This is a signal to retry the request with the new region. The new region is stored in the region attribute of the exception, which is an APIUrl enum value.

exception pylibrelinkup.exceptions.TermsOfUseError[source]

Bases: PyLibreLinkUpError

Raised when the user needs to accept terms of use.