fix: wrap unavailable CAA Bloks login endpoint#2728
Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<6 chars>:81/<6 chars>:82) sosend_login_requestno longer returns the null-payload 404 for the helper payload.TwoFactorRequiredinstead of leaking low-levelClientNotFoundError.404 + field_exception + Payload returned is nullfallback path reported in [BUG] #2725.Context
Refs #2725.
Fresh v434 login HAR metadata shows successful CAA login flows use
username_text_input_id=<6 chars>:81andpassword_text_input_id=<6 chars>:82. Live probes on this branch confirm the old helper payload returnedClientNotFoundError/404, while the updated payload returnsstatus=okforcom.bloks.www.bloks.caa.login.async.send_login_request.The PR still keeps the defensive wrapper because Instagram can return the same null-payload 404 for unsupported account/session states. Full automatic completion of every flagged-account CAA flow still depends on getting a real account state that returns
two_step_verification_context.Live Account Smoke
09-06-26_02-29-01-f516aec435b10cb570b50db0ce002097.txt) without printing credentials: 500 full rows with parseable session/auth and UUIDs.account_info()anduser_info_by_username_v1("instagram")passed.status=okon both default client settings and saved account settings;ClientNotFoundErrorasTwoFactorRequired.Pre-Landing Review
No issues found.
Design Review
No frontend files changed; design review skipped.
Eval Results
No prompt-related files changed; evals skipped.
Plan Completion
No plan file detected.
Test plan
.venv/bin/python -m ruff check ..venv/bin/python -m ruff format --check ..venv/bin/python -m pytest tests/regression/test_auth_story.py::AuthAndStoryRegressionTestCase::test_login_bad_password_without_context_wraps_unavailable_caa_bloks_endpoint -q.venv/bin/python -m pytest tests/regression/test_bloks.py::BloksRegressionTestCase::test_bloks_caa_login_send_request_uses_current_payload -q.venv/bin/python -m pytest tests/regression/test_auth_story.py tests/regression/test_bloks.py -q.venv/bin/python -m pytest tests/regression -q(661 passed, 3 skipped)