Documentation Index
Fetch the complete documentation index at: https://docs-staging.auth0-mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).
It groups errors into three kinds:In addition to rendering messages, you can filter by field or kind:
auth0— errors returned by Auth0 or your own backend.validation— errors from client-side validation (e.g., invalid form input).configuration— errors caused by incorrect integration or SDK misuse.
Key Features
- Unified error store — surfaces auth0, validation, and configuration errors from a single hook.
- Flexible filtering — query errors by kind, field, or a combination of both.
- Dismiss controls — remove individual errors or clear all at once.
Parameters
Optional configuration for the hook.
Returns
UseErrorsResultA UseErrorsResult object containing:errors— the full error list of typeErrorsResult, with helpers:errors.byType(type, filter?)— filter by error type and optionally by field.errors.byField(field, filter?)— filter by field and optionally by type.
hasError—trueif any error is currently present.dismiss(id)— remove a specific error by its ID.dismissAll()— clear all tracked errors.
Supported Screens
- The
useErrorshook is available on every ACUL screen.
Example
Remarks
useErrorsis not screen-scoped — import it directly from@auth0/auth0-acul-react.- Call
useErrorsat the top level of your component; do not call it conditionally or inside event handlers. - Use
includeDevErrors: trueduring development to surface SDK misuse errors; disable it in production.