/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-errorboundary-ef5392b6b0cd-errorboundary-s0025-c0000.md
ErrorBoundary (1) - hono-docs
ErrorBoundary (1) Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt errorboundary Summary You can c...
ErrorBoundary (1)
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#errorboundary
Summary
You can catch errors in child components using ErrorBoundary. In the example below, it will show the content specified in fallback if an error occurs. ```tsx function SyncComponent() { throw new Error('Error') return Hello } app.get(...
Content
You can catch errors in child components using ErrorBoundary.
In the example below, it will show the content specified in fallback if an error occurs.
function SyncComponent() {
throw new Error('Error')
return <div>Hello</div>
}
app.get('/sync', async (c) => {
return c.html(
<html>
<body>
<ErrorBoundary fallback={<div>Out of Service</div>}>
<SyncComponent />
</ErrorBoundary>
</body>
</html>
)
})ErrorBoundary can also be used with async components and Suspense.