Add debug logging to auto-login twofa step

Prints twofa response status, Location header, and body so we can see
exactly what Zerodha returns after TOTP submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thigazhezhilan J 2026-05-25 21:30:03 +05:30
parent df137afcbd
commit a1b19b7431

View File

@ -221,6 +221,12 @@ def _perform_zerodha_login(
timeout=15,
allow_redirects=False,
)
print(
f"[AUTO-LOGIN-DEBUG] twofa status={twofa_resp.status_code} "
f"location={twofa_resp.headers.get('Location', 'NONE')} "
f"body={twofa_resp.text[:300]}",
flush=True,
)
# Step 4: Follow redirects manually to intercept request_token
request_token = None