AI-1261 Frontend Error Page - #172
Merged
Merged
Conversation
dbarkowsky
marked this pull request as ready for review
May 20, 2026 20:57
dbarkowsky
requested review from
NoorChasib,
alex-struk,
antsand and
kmandryk
as code owners
May 20, 2026 20:57
kmandryk
requested changes
May 29, 2026
kmandryk
approved these changes
Jun 3, 2026
kmandryk
left a comment
Collaborator
There was a problem hiding this comment.
Good to go - the error boundary issue is minor, I'll leave that up to you to address or not.
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.
Summary
AI-1261
Changes
ErrorBoundarythat catches unhandled errors thrown by top-level providers (AuthProvider,GroupProvider,QueryClientProvider) and reports them to the backend. Supports up to 3 retry attempts before redirecting the user to the home page, with progressive button label feedback ("Try again" → "Go to home page").RouterErrorPagecomponent registered as theerrorElementon the root route, catching errors thrown inside route components (anything underRootLayout) that React Router's internal boundary intercepts before the classErrorBoundarycan. Reports errors to the backend and provides a "Go to home page" button.POST /api/client-errorsNestJS endpoint inLoggingModulethat accepts structured client error payloads (message, component stack, error stack, page URL, user agent) and writes them to the structured logging pipeline (Loki viaAppLoggerService).ClientErrorDtoandClientErrorResponseDtowith full class-validator decorators and Swagger/OpenAPI documentation.HelloWorldcomponent.RouterErrorPagefallback UI.ErrorBoundary, 4 forRouterErrorPage, and 3 Jest tests forClientErrorController.Testing
Dev: alltask ornpm run dev:frontend+npm run dev:backend).throw new Error("test")at the top ofUploadPage). Navigate to that route — theRouterErrorPagefallback with the error illustration and "Go to home page" button should appear.POST /api/client-errorsrequest was sent from the browser (check the Network tab) withmessage,errorStack,url, anduserAgentfields.Client-side error reportedstructured log entry containing the error details./.ErrorBoundary, trigger an error above the router (e.g. throw inAuthProvider). The full-screen fallback with retry button should render. Clicking "Try again" twice should change the button label to "Go to home page"; clicking it should redirect to/.npx vitest run src/components/ErrorBoundary.spec.tsx src/components/RouterErrorPage.spec.tsxfromapps/frontend— all 10 tests should pass.npm test -- --testPathPattern=client-errorfromapps/backend-services— all 3 tests should pass.Checklist
By submitting this pull request, I acknowledge that I have attempted to meet the following: