An object containing:
beforeRequest: Checks the request signal — throws AbortError if already aborted.onCancel: Logs cancellation with the request URL and reason.Checks the request signal — throws AbortError if already aborted.
Logs cancellation with the request URL and reason.
Hook: abort request if signal fires before it completes.
The abort error uses DOMException when available (browsers, Deno, Bun, Node.js 18+). Falls back to a plain Error in older runtimes. The AbortError name is set on the fallback error for compatibility.