Skip to main content
React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login). With all validation and server-side errors. It groups errors into three kinds:
  • server — errors returned by Auth0 or your own backend.
  • client — errors from client-side validation (e.g., invalid form input).
  • developer — errors caused by incorrect integration or SDK misuse.

Returns

UseErrorsResultAn object of type UseErrorsResult, containing:
  • errors — the full error list of type ErrorsResult, with helpers:
    • errors.byKind(kind, filter?) — filter by error kind and optionally by field.
    • errors.byField(field, filter?) — filter by field and optionally by kind.
  • hasErrortrue if any error is currently present.
  • dismiss(id) — remove a specific error by its ID.
  • dismissAll() — clear all tracked errors.
Typical usage is inside a form or screen component where you need to reactively display errors and provide ways to dismiss them:

Supported Screens

  • The useErrors hook is available on every ACUL screen.
Example
In addition to rendering messages, you can filter by field or kind: