A segment error boundary can offer a retry for a transient failure. Resetting the boundary rerenders the segment and does not guarantee the cause has cleared.
Worked example
"use client";
// app/studio/error.tsx
export default function RetryRouteSegment({ reset }: { reset: () => void }) {
return (
<section role="alert">
<h2>This section could not load.</h2>
<button onClick={reset}>Try again</button>
</section>
);
}Implementation notes
Preserve useful context in an error view while avoiding sensitive exception details. A retry should be an explicit action with a predictable scope.
Try it yourself
Compare a one-time failure with one that occurs on every render.
Open the Next.js example →Editorial date January 2, 2026 · Published December 6, 2026