ENG-3263: new privacy center error page#7998
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7998 +/- ##
==========================================
+ Coverage 85.17% 85.19% +0.01%
==========================================
Files 637 638 +1
Lines 41971 42011 +40
Branches 4934 4937 +3
==========================================
+ Hits 35749 35791 +42
+ Misses 5112 5111 -1
+ Partials 1110 1109 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
(revert accidentally commited testing tweak)
Contributor
Author
|
/code-review |
adamsachs
reviewed
May 5, 2026
Contributor
adamsachs
left a comment
There was a problem hiding this comment.
the minimal backed changes here seem fine, but I'll defer to a FE review on the privacy center changes specifically
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.
Ticket ENG-3263
Description Of Changes
When the Privacy Center fails to render (e.g. a JS exception during boot), users currently see the unstyled
react-error-boundarydefault and the raw exception message is exposed in the page. This PR replaces it with a branded error view that never leaks raw error details and reads its message from a new optionalerror_messageconfig field, falling back to"The Privacy Center is currently unavailable. Please try again later."when unset.A design wrinkle worth flagging (and why there are two "After" screenshots): branding info — logo, custom error message — comes from the same
configthat may itself have failed to load (validation errors, network issues, malformed payload). The error component reads config defensively viauseAppSelectorrather thanuseConfig(which throws on undefined state, and would cause an infinite error-boundary loop) and gracefully degrades to a plain card with the default message when no config is available.Before
After (config loads)
Shows logo and custom error message
After (Config can't load)
No logo and error message fallback
Code Changes
error_message: Optional[str]to thePrivacyCenterConfigPydantic schema and mirrored it on the frontendConfigand generatedPrivacyCenterConfigtypes.components/Error.tsx: branded layout, readserror_messageandlogo_pathdefensively viauseAppSelector(so a missing config slice doesn't trigger a second error), drops the rawerror.messageblock, and hides the logo bar viaonErrorif the configured asset fails to load.components/Providers.tsxfromfallbackRendertoFallbackComponentso hooks work inside the fallback (fallbackRenderis a render function, not a component, so hook calls inside it throw).components/ErrorLayout.tsx(no remaining consumers).error_message.Steps to Confirm
cd clients/privacy-center && npm run dev).throw new Error("test")at the top of the root page component.logo_pathis set, "Error" heading, default unavailable message, "Try again" button) and that no raw error text appears anywhere in the DOM."error_message": "Custom test message"toconfig/config.json, reload, and confirm the custom string replaces the default./logo.svgin DevTools (Network → Block request URL) and confirm the logo bar is hidden without breaking the card.npm run typecheckandnpx jest __tests__/components/Error.test.tsx; backend:pytest tests/ops/schemas/test_privacy_center_config.py.Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works