Skip to content

v0.1.4 — AuthenticationError for automatic reauth triggering

Choose a tag to compare

@NerdySoftPaw NerdySoftPaw released this 06 Jun 07:20
· 15 commits to main since this release
e6e45c1

v0.1.4

New: AuthenticationError exception

Providers now raise AuthenticationError (instead of silently returning None) when they receive HTTP 401 or 403 from the API.

This allows HA integrations to catch AuthenticationError and raise ConfigEntryAuthFailed, which automatically surfaces a "Re-authenticate" button in the HA integrations panel when an API key expires or is rotated.

Affected providers: NTA, RMV, Trafiklab, OTP base (OPT/VBN/OTP Custom), TRIAS base (VBN TRIAS), National Rail, Rejseplanen

from openpublictransport import AuthenticationError