Reactive Utilities

catchError

Edit this page
note
New in v1.7.0
import { catchError } from "solid-js";
function catchError<T>(tryFn: () => T, onError: (err: any) => void): T;

Wraps a tryFn with an error handler that fires if an error occurs below that point. Only the nearest scope error handlers execute. Rethrow to trigger up the line.

Last updated: 3/24/26, 3:52 PMReport an issue with this page