fix: login error logging + E-Mail label (v0.1.2)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user