Skip to content

[Fix] AttributeError crash in abort-testing on request timeout - #128

Merged
mergify[bot] merged 1 commit into
project-chip:v2.16-cli-developfrom
antonio-amjr:fix/abort_cmd_exception_issue
Sep 30, 2026
Merged

mergify[bot] merged 1 commit into
project-chip:v2.16-cli-developfrom
antonio-amjr:fix/abort_cmd_exception_issue

Conversation

@antonio-amjr

@antonio-amjr antonio-amjr commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Fix: project-chip/certification-tool#1152

Fixes crash reported when running th-cli abort-testing — request would time out and instead of printing "Abort request sent (backend may still be processing)", it crashed with AttributeError: 'ResponseHandlingException' object has no attribute 'source'.

ResponseHandlingException stores the wrapped exception as .error, not .source. The timeout-handling branch in abort_testing.py checked the wrong attribute, so it never worked — any real timeout hit the AttributeError instead of the intended graceful message.

Change: cli/th_cli/commands/abort_testing.py — e.source → e.error.

Testing: Reproduced by temporarily lowering the client timeout to force a ReadTimeout; confirmed it now prints "Abort request sent (backend may still be processing)" instead of crashing.

@antonio-amjr antonio-amjr self-assigned this Sep 30, 2026
@antonio-amjr antonio-amjr added the bug Something isn't working label Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a4c28f70-5fe1-4896-a8d7-8c107b915e91

📥 Commits

Reviewing files that changed from the base of the PR and between db222e6 and 6f4bf18.

📒 Files selected for processing (1)
  • th_cli/commands/abort_testing.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The abort-testing command now checks ResponseHandlingException.error to identify timeout errors. The timeout message and handling of other exceptions remain unchanged.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 6f4bf

The timeout handler now checks the exception field that holds the wrapped error. No actionable merge-blocking risk remains in the supplied review context.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the AttributeError crash and the abort-testing request-timeout scenario. It is concise and directly matches the main change.
Description check ✅ Passed The description accurately explains the timeout failure, the incorrect .source attribute, the replacement with .error, and the reported test result.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Queued — the merge queue status continues in this comment ↓.

@oxesoft oxesoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified: ResponseHandlingException stores the wrapped exception as .error (no .source), and send_inner wraps httpx timeouts in it. Fix is correct.

@mergify

mergify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Merge Queue Status

  • ✅ Entered queue — 2026-09-30 18:16 UTC · Rule: default · triggered by @antonio-amjr with the merge queue checkbox
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-09-30 18:17 UTC · at f2669d8283324a993a437e19a3290f6c6aedc279

This pull request spent 14 seconds in the queue, including 2 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Sep 30, 2026
@mergify
mergify Bot merged commit f2669d8 into project-chip:v2.16-cli-develop Sep 30, 2026
5 checks passed
@mergify mergify Bot removed the queued label Sep 30, 2026
@antonio-amjr
antonio-amjr deleted the fix/abort_cmd_exception_issue branch September 30, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants