Auth0 Universal Components
    Preparing search index...

    Function useErrorHandler

    • Hook for consistent error handling across the app.

      Returns (error: unknown, options?: ErrorHandlerCallOptions) => void

      Error handler function.

      const handleError = useErrorHandler();

      // With custom message
      onError: (error) => handleError(error, {
      fallbackMessage: t('my_error')
      });

      // With defaults
      onError: handleError;