Catch agnostic HTTP error types across cloud_foundry_api and swap the test#24280
Catch agnostic HTTP error types across cloud_foundry_api and swap the test#24280mwdd146980 wants to merge 1 commit into
Conversation
… test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1fe6f4dc9a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
dkirov-dd
left a comment
There was a problem hiding this comment.
Approved too fast, could you switch the changelog type to fixed or something other than changed?
Validation Report
Run Passed validations (20)
|
|
@dkirov-dd I'm using |
What does this PR do?
Widen the HTTP exception handling in
cloud_foundry_apito catch the backend-agnosticHTTPErrorandHTTPStatusErrortypes alongside the existingrequestsones, and swap the tests to inject and assert the agnostic types.Motivation
Part of the httpx migration. The agnostic
http_exceptionshierarchy shares no base class withrequests.exceptions, so the check must catch both families to keep working once the HTTP backend swaps to httpx. The connect handlers pairRequestExceptionwith the agnostic baseHTTPError; the status handlers pair requests'HTTPError(aliased toRequestsHTTPError) with the agnosticHTTPStatusError. No observable behavior change under the shippedrequestsbackend.Verification
Full
cloud_foundry_apiunit suite passes. Confirmed red-then-green on thescroll_api_pageshandlers: with the tests swapped to agnostic types and production left requests-only, the two scroll error tests fail with the agnosticHTTPErrorescaping the requests-onlyexcept; after widening, they pass. The four re-raise sites (discover_api,get_oauth_token) stay green either way and were verified by reading the handlers.ddev test -fsis clean.Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged