Const
Error name for aborted fetch requests.
This matches the standard AbortError name used by the Fetch API when a request is cancelled via AbortController.abort().
AbortError
AbortController.abort()
import { fetchT, ABORT_ERROR } from '@happy-ts/fetch-t';const task = fetchT('https://api.example.com/data', { abortable: true });task.abort();const result = await task.result;result.inspectErr((err) => { if (err.name === ABORT_ERROR) { console.log('Request was aborted'); }}); Copy
import { fetchT, ABORT_ERROR } from '@happy-ts/fetch-t';const task = fetchT('https://api.example.com/data', { abortable: true });task.abort();const result = await task.result;result.inspectErr((err) => { if (err.name === ABORT_ERROR) { console.log('Request was aborted'); }});
Error name for aborted fetch requests.
This matches the standard
AbortErrorname used by the Fetch API when a request is cancelled viaAbortController.abort().