Learn more about Mintlify
Enter your email to receive updates about new features and product releases.
Error handling and recovery utilities
import { ErrorBoundary } from "bytekit"; // or import { ErrorBoundary } from "bytekit/error-boundary";
const boundary = new ErrorBoundary({ onError: (error) => { console.error("Caught error:", error); }, fallback: () => { return { error: true, message: "Something went wrong" }; } }); const result = await boundary.execute(async () => { return await riskyOperation(); });