Skip to content

error

Utilities in the error category.

  • isAbortError — Checks whether a value is a DOMException with name 'AbortError'.
  • parseJSONSafe — Safely parses a JSON string with optional fallback handling.
  • withTryCatch — Executes a function and returns its outcome as a discriminated union.
  • withTryCatchSync — Executes a synchronous function and returns its outcome as a discriminated union.