Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Cancellation with AbortSignal and abort error handling
import { run } from "tryo"; const controller = new AbortController(); const r = await run(() => fetch("/api", { signal: controller.signal }), { ignoreAbort: true, onAbort: (s) => console.log("abort"), }); controller.abort();
ignoreAbort: true
onError
ABORTED
useEffect(() => { const c = new AbortController(); run(() => fetch("/api", { signal: c.signal }), { ignoreAbort: true }); return () => c.abort(); }, []);