Skip to content

fix: catch and raise unauth exceptions in all paths to trigger refresh.#8

Merged
chrisdoehring merged 1 commit intomainfrom
release-20260309-hotfix
Mar 9, 2026
Merged

fix: catch and raise unauth exceptions in all paths to trigger refresh.#8
chrisdoehring merged 1 commit intomainfrom
release-20260309-hotfix

Conversation

@chrisdoehring
Copy link
Copy Markdown

This pull request improves error handling for authentication failures when interacting with the Ctrack Crystal API. Specifically, it adds explicit handling for unauthorized and forbidden exceptions, ensuring that authentication errors are logged with clear messages and that action activity is recorded appropriately.

Authentication error handling improvements:

  • Added specific exception handling for UnauthorizedException and ForbiddenException in _fetch_this_vehicle, logging the error, recording an action activity with error details, and re-raising the exception.
  • Added similar exception handling in _do_fetch, logging authentication failures, recording an action activity, and returning a result indicating no observations were extracted.

@chrisdoehring chrisdoehring merged commit 0a5b641 into main Mar 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant