Errors
All errors extend HeadqueryError and are exported from @headquery/statamic (and
@headquery/core).
| Error | When | Properties |
|---|---|---|
HeadqueryHttpError | The CMS answered with a non-2xx status | status, url, body (parsed JSON or raw text) |
HeadqueryNetworkError | No usable response: network failure, CORS, abort, invalid JSON | url, cause |
import { } from "@headquery/statamic";
try {
await .("blog").("missing").();
} catch () {
if ( instanceof && . === 404) {
// not found
}
throw ;
}Last updated on