Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
809 B ยท 36 lines
TSX
12345678910111213141516171819202122232425262728293031323334353637"use client";
import { Component, type ErrorInfo, type ReactNode } from "react";
type Props = { children: ReactNode;};
type State = { error: Error | null;};
export class ChatErrorBoundary extends Component<Props, State> { state: State = { error: null };
static getDerivedStateFromError(error: Error): State { return { error }; }
componentDidCatch(error: Error, info: ErrorInfo) { console.warn("chat render crash", error, info); }
render() { if (this.state.error) { return ( <div className="mx-auto max-w-3xl p-6 text-sm"> <div className="bg-destructive/10 text-destructive rounded-md border p-4"> The conversation failed to render. Reload to recover. </div> </div> ); } return this.props.children; }}