Skip to content

Error Handling Behaviors

Use cases and scenarios for the GEN::ERR (Error Handling) area. These behaviors define how the application responds to exceptional or unsupported conditions that prevent the user from accessing the normal application experience. The three areas covered are: detection and display of mobile device access, rendering of unknown routes, and the developer-facing debug info panel.

GEN::ERR::0001 — Mobile Device Check Page

Section titled “GEN::ERR::0001 — Mobile Device Check Page”

The application detects when a mobile browser is accessing the system and renders a dedicated page that communicates the limitation without crashing or showing the standard application chrome.

PersonaIrene Itemsworth (Inventory Manager), Sam Scansworth (Shop Floor Worker), David Dealsworth (Purchasing Manager), Keisha Clerkson (Receiving Clerk), Owen Ownerton (Business Principal), Alan Adminson (Account Admin)
StatusCovered

GEN::ERR::0001::0001.US — View Mobile Device Check Page

Section titled “GEN::ERR::0001::0001.US — View Mobile Device Check Page”

The browser navigates to /mobile-device-check, either because the user entered that URL directly or because the application detected a mobile user agent and redirected. The page loads and renders messaging appropriate for mobile device users — for example, a recommendation to use a desktop browser or information about a restricted feature set. The standard application chrome (sidebar, header bar) is not rendered on this page. The exact content depends on application configuration and may vary by tenant.

GEN::ERR::0002 — 404 Page for Unknown Routes

Section titled “GEN::ERR::0002 — 404 Page for Unknown Routes”

The application renders a recognizable not-found page when the user navigates to a URL that does not match any defined route, preventing unhandled errors from reaching the user.

PersonaIrene Itemsworth (Inventory Manager), Sam Scansworth (Shop Floor Worker), David Dealsworth (Purchasing Manager), Keisha Clerkson (Receiving Clerk), Owen Ownerton (Business Principal), Alan Adminson (Account Admin)
StatusCovered

GEN::ERR::0002::0001.US — View 404 Page for Unrecognized Route

Section titled “GEN::ERR::0002::0001.US — View 404 Page for Unrecognized Route”

An authenticated user navigates to a URL that does not match any application route (for example, /nonexistent-page). Next.js renders a 404 Not Found page. The page renders without crashing or producing an unhandled JavaScript error. Whether the standard application chrome (sidebar, header) appears depends on the layout hierarchy of the unmatched route. The page communicates clearly that the requested resource was not found.

A developer-facing diagnostic panel provides environment information, mock mode status, and other runtime diagnostics in non-production deployments. It is suppressed in production to avoid leaking internal configuration.

PersonaIrene Itemsworth (Inventory Manager), Alan Adminson (Account Admin)
StatusCovered

GEN::ERR::0003::0001.FS — Show Debug Info Panel in Non-Production Environments

Section titled “GEN::ERR::0003::0001.FS — Show Debug Info Panel in Non-Production Environments”

When NEXT_PUBLIC_DEPLOY_ENV is set to development or staging, the debug info panel is rendered on every authenticated page. The panel displays environment information such as the deploy environment name, mock mode status (NEXT_PUBLIC_MOCK_MODE), and other developer diagnostics. The panel is visible to all authenticated users in these environments.

GEN::ERR::0003::0002.FS — Hide Debug Info Panel in Production

Section titled “GEN::ERR::0003::0002.FS — Hide Debug Info Panel in Production”

When NEXT_PUBLIC_DEPLOY_ENV is set to production, the debug info panel is not rendered and produces no DOM output. Users in the production environment never see internal diagnostic information. E2E tests running in mock mode will see the debug panel; tests that specifically verify production-mode behavior must assert on the absence of the panel.

Use CaseScenariosUSFSUC
GEN::ERR::0001 Mobile Device Check Page1100
GEN::ERR::0002 404 Page for Unknown Routes1100
GEN::ERR::0003 Debug Info Panel2020
Total4220