You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rohlík's login endpoint can answer {"status": 202, "messages": [], "data": null} — the login was accepted but is not complete until the user clicks a link Rohlík e-mails them, so no session is issued. Their login page carries the matching copy ("Pro dokončení přihlášení klikněte na odkaz, který jsme vám poslali na adresu {{email}}" / "Zbývá jen potvrdit e-mail"), and they have magicLink → /magic-login/keep-account and /verification/email routes. Full analysis in #79.
This is account-level state on Rohlík's side, so it is not something the integration can satisfy itself — the user has to act in their mailbox.
Current behaviour
rohlik-api collapses this into a bare RohlikAPIError whose message degenerates to "Unknown error occurred during login: Unknown error", dropping the status code (upstream: dvejsada/rohlik_api_python#8).
Config flow / reauth (config_flow.py:84, config_flow.py:147): except RohlikAPIError → cannot_connect → "Failed to connect to Rohlik.cz". Actively misleading — the connection is fine, and the user goes off debugging their network. On v0.5.0 the same case surfaced as "Neočekávaná chyba" (Neočekávaná chyba #79).
Runtime (hub.py:476): RohlikAPIError → UpdateFailed, so a 202 on a re-login makes the integration retry forever and sit there unavailable, with nothing telling the user why.
the incomplete-login error → a new login_not_confirmed string, e.g. "Rohlík.cz needs this login confirmed. Open the link Rohlík just e-mailed to your address, then try again." — added to both translations/en.json and translations/cs.json.
Handle it at runtime too, rather than retrying silently: raise a repair issue (homeassistant.helpers.issue_registry) carrying the same instruction, since this needs the user to do something outside Home Assistant. ConfigEntryAuthFailed is the alternative, but the reauth dialog asks for a password that is not the actual problem.
Keep a test for each mapping so the "cannot_connect" regression cannot come back.
Notes
The 202 semantics are inferred from Rohlík's frontend, not from documentation — see #79 for exactly what is verified (including that the request shape is not the cause: a cookie-less POST with the library's User-Agent returns a proper 401 for bad credentials). Worth confirming against a real 202 before shipping the user-facing wording.
Background
Rohlík's login endpoint can answer
{"status": 202, "messages": [], "data": null}— the login was accepted but is not complete until the user clicks a link Rohlík e-mails them, so no session is issued. Their login page carries the matching copy ("Pro dokončení přihlášení klikněte na odkaz, který jsme vám poslali na adresu {{email}}" / "Zbývá jen potvrdit e-mail"), and they havemagicLink→/magic-login/keep-accountand/verification/emailroutes. Full analysis in #79.This is account-level state on Rohlík's side, so it is not something the integration can satisfy itself — the user has to act in their mailbox.
Current behaviour
rohlik-apicollapses this into a bareRohlikAPIErrorwhose message degenerates to "Unknown error occurred during login: Unknown error", dropping the status code (upstream: dvejsada/rohlik_api_python#8).config_flow.py:84,config_flow.py:147):except RohlikAPIError→cannot_connect→ "Failed to connect to Rohlik.cz". Actively misleading — the connection is fine, and the user goes off debugging their network. Onv0.5.0the same case surfaced as "Neočekávaná chyba" (Neočekávaná chyba #79).hub.py:476):RohlikAPIError→UpdateFailed, so a 202 on a re-login makes the integration retry forever and sit there unavailable, with nothing telling the user why.What to do
Blocked on dvejsada/rohlik_api_python#8 landing (dedicated error type / status on the exception), then here:
InvalidCredentialsError→invalid_authAPIRequestFailedError→cannot_connect(genuine network failures)login_not_confirmedstring, e.g. "Rohlík.cz needs this login confirmed. Open the link Rohlík just e-mailed to your address, then try again." — added to bothtranslations/en.jsonandtranslations/cs.json.homeassistant.helpers.issue_registry) carrying the same instruction, since this needs the user to do something outside Home Assistant.ConfigEntryAuthFailedis the alternative, but the reauth dialog asks for a password that is not the actual problem.Notes
The 202 semantics are inferred from Rohlík's frontend, not from documentation — see #79 for exactly what is verified (including that the request shape is not the cause: a cookie-less POST with the library's User-Agent returns a proper 401 for bad credentials). Worth confirming against a real 202 before shipping the user-facing wording.