Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves diagnostics for OIDC/Proxy-related failures by recovering HTTP response details (status, headers, URL, body) from certain Axios ERR_NETWORK cases where the underlying XHR actually completed with a valid HTTP status (e.g., 504). This makes error display/logging more informative and adds regression coverage.
Changes:
- Add recovery logic in the base Axios response error handler to reconstruct
error.responsefrom XHR fields onERR_NETWORK. - Add unit tests for response recovery + ensure redirect-to-auth / NEED_RESET behaviors remain compatible.
- Add E2E coverage and screenshots for a “recoverable XHR ERR_NETWORK → 504 + x-worker-name” scenario.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/services/api/base.ts |
Adds XHR-based recovery for ERR_NETWORK and factors interceptor error logic into handleBaseApiResponseError. |
src/services/api/__test__/base.test.ts |
Unit tests for recovered response shape, header parsing, JSON parsing, and NEED_RESET behavior. |
src/utils/errors/__test__/extractErrorDetails.test.ts |
Verifies extractErrorDetails includes HTTP details when ERR_NETWORK has recovered HTTP metadata. |
tests/suites/errorDisplay/errorDisplayMocks.ts |
Adds Playwright init-script mock that forces Axios to throw ERR_NETWORK with XHR-like request details. |
tests/suites/errorDisplay/errorDisplay.test.ts |
Adds full-page E2E test asserting 504/title/headers are shown for recovered network error. |
tests/suites/errorDisplay/errorDisplay.test.ts-snapshots/*.png |
New visual snapshots for the added E2E scenario (Chromium/Safari on Linux). |
Raubzeug
approved these changes
Apr 10, 2026
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.
Closes #3786
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ✨1
✨ New Tests (1)
Bundle Size: 🔺
Current: 63.40 MB | Main: 63.39 MB
Diff: +6.88 KB (0.01%)
ℹ️ CI Information