Skip to Content
ClientErrors

Errors

All errors extend HeadqueryError and are exported from @headquery/statamic (and @headquery/core).

ErrorWhenProperties
HeadqueryHttpErrorThe CMS answered with a non-2xx statusstatus, url, body (parsed JSON or raw text)
HeadqueryNetworkErrorNo usable response: network failure, CORS, abort, invalid JSONurl, cause
import { } from "@headquery/statamic"; try { await .("blog").("missing").(); } catch () { if ( instanceof && . === 404) { // not found } throw ; }
Last updated on