Improved Error Handling: Route-Level Error Boundaries in the Dashboard
Improved Error Handling: Route-Level Error Boundaries in the Dashboard
Version: 1.0.385
Overview
Starting in v1.0.385, the platform introduces page-level error boundaries for the most critical dashboard routes. When something goes wrong inside the quarterly submissions, transactions, or HMRC workflow sections, you will now see a clear, contextual error message and a recovery button — instead of a blank screen or a generic error page.
Background
Next.js App Router supports a file-based error boundary convention: placing an error.tsx file inside a route segment automatically catches any unhandled runtime errors thrown within that segment's component tree. Without these files, errors propagate up to the nearest ancestor boundary — or to the application root — giving users no context about what failed or how to recover.
The dashboard routes that power HMRC submissions and transaction management are deeply nested and interact with external services (HMRC APIs, bank feeds). These are the most likely places for transient runtime errors to occur, and therefore the most important to handle gracefully.
Affected Routes
/dashboard/quarterly — Quarterly Submissions
Errors in the quarterly submissions view (e.g. failed data fetch, rendering errors during the HMRC submission workflow) are now caught here. Users see:
- A message indicating the quarterly submissions could not be loaded.
- A Try again button that calls Next.js's built-in
reset()function to re-render the segment without a full page reload.
/dashboard/transactions — Transaction Management
Errors in the transactions view (e.g. bank feed import failures, transaction categorisation errors) are now caught here. Users see:
- A message indicating the transactions could not be loaded.
- A Try again button for in-place recovery.
/dashboard/hmrc — HMRC Connection & Submission
Errors in the HMRC workflow (e.g. OAuth token issues, submission API errors, connection problems) are now caught here. Users see:
- A message indicating the HMRC submission workflow could not be loaded.
- A Try again button for in-place recovery.
How Recovery Works
Each error boundary renders a Try again button that invokes Next.js's reset() function. This re-renders the failed route segment from scratch without reloading the entire page. Other parts of the dashboard (navigation, sidebar, unaffected sections) remain interactive during this process.
If the underlying issue was transient (a temporary network hiccup, a short-lived API timeout), clicking Try again will typically restore the view without any further action required.
If the error persists after retrying, contact support with details of the action you were performing.
What Is Not Covered
The following dashboard route segments do not yet have dedicated error boundaries and will still fall back to higher-level handling if an error occurs:
/dashboard/settings/dashboard/bank- Other nested sub-routes not listed above
These are lower-risk paths and are candidates for a future update.
No Action Required
This change is fully transparent to end users and requires no configuration. Error boundaries activate automatically if a runtime error occurs within their route segment.