Skip to content

fix: enhance oidc logs#3787

Merged
astandrik merged 2 commits intomainfrom
astandrik.enhance-errors-2
Apr 10, 2026
Merged

fix: enhance oidc logs#3787
astandrik merged 2 commits intomainfrom
astandrik.enhance-errors-2

Conversation

@astandrik
Copy link
Copy Markdown
Collaborator

@astandrik astandrik commented Apr 9, 2026

Closes #3786

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
608 598 0 7 3
Test Changes Summary ✨1

✨ New Tests (1)

  1. Full-page — whoami recoverable XHR network error restores 504 and worker details (errorDisplay/errorDisplay.test.ts)

Bundle Size: 🔺

Current: 63.40 MB | Main: 63.39 MB
Diff: +6.88 KB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copilot AI review requested due to automatic review settings April 9, 2026 21:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.response from XHR fields on ERR_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).

@astandrik astandrik added this pull request to the merge queue Apr 10, 2026
Merged via the queue into main with commit 269d0f7 Apr 10, 2026
20 checks passed
@astandrik astandrik deleted the astandrik.enhance-errors-2 branch April 10, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: enhance oidc logs

3 participants