Skip to Content
Welcome to RitoSwap's documentation!
Documentation SiteError Boundaries

Error Boundaries

The docs site wraps pages in a custom error boundary so runtime failures render a branded recovery UI instead of a generic crash.

Core pieces

    • DocsErrorBoundary.tsx
    • PageError.tsx
    • ErrorShellFullPage.tsx
    • ErrorShellInline.tsx
    • ErrorShell.module.css

Behavior

ComponentPurpose
DocsErrorBoundaryTop-level boundary using react-error-boundary
PageErrorAction-driven fallback UI with reset + navigation options
ErrorShellFullPageFull-page branded shell with animated background
ErrorShellInlineCompact inline error message for localized failures

Usage pattern

The boundary uses fallbackRender to show PageError and logs the error to the console for debugging.

If you need an inline error, use ErrorShellInline in the component itself instead of throwing to the boundary.

Sample UI

Full-page error shell

Inline error shell

Inline error boundary

Last updated on

RitoSwap Docs does not store, collect or access any of your conversations. All saved prompts are stored locally in your browser only.