fix: login error logging + E-Mail label (v0.1.2)

This commit is contained in:
2026-04-15 12:40:36 +02:00
parent 6c3c3c9b48
commit e24f9a8b7e
4 changed files with 11 additions and 3 deletions
+8
View File
@@ -101,10 +101,18 @@ class FamilyWallClient:
if "ex" in body or "un" in body:
error_data = body.get("ex", body.get("un"))
print(
f"[LOGIN ERROR] status={response.status_code} body={body}",
file=sys.stderr,
)
msg = f"Login failed: {error_data}"
raise FamilyWallError(msg, response_data=body)
if "r" not in body:
print(
f"[LOGIN ERROR] status={response.status_code} body={body}",
file=sys.stderr,
)
raise FamilyWallError("Login failed: unexpected response format", response_data=body)
# Extract JSESSIONID from the Set-Cookie header