> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Raise Errors from Rules

> The Auth0 login page can’t display an error message from a rule. Learn what to do instead.

> [!WARNING]
>
> **Rules will reach end of life (EOL) on January 31, 2028.**
>
> * As of October 16, 2023, Rules are no longer available in newly created tenants.
> * As of November 18, 2024, Rules are read-only. Active Rules still run, and you can enable or disable them and change their configuration values and secrets. You can't edit their code in the Dashboard, the Management API, or tools that use it, such as the Auth0 CLI, Deploy CLI, Terraform, and Agent Skills.
> * **After January 31, 2028, Rules stop running and are removed.**

**Use Actions to extend Auth0:**

* To learn more about Actions, read [Understand How Auth0 Actions Work](/docs/docs/customize/actions/actions-overview).
* To migrate, read [Migrate from Rules to Actions](/docs/docs/customize/actions/migrate/migrate-from-rules-to-actions).

The Auth0 login page can’t display an error message from a rule. If you want users to see a custom message raised from a rule, your app must display that message.

Any error resulting from a rule goes to your callback URL in the protocol’s standard response mode. For example, if your application requests authentication using OIDC/OAuth2, it receives a standard OAuth2 error with `error` and `error_description` result values.

Suppose your callback URL is [https://travel0.com/callback](https://travel0.com/callback) and you’re using the standard query response mode. You would receive this response:

```http wrap lines theme={null}
https://travel0.com/callback?error=access_denied&error_description=[The message you wrote in the rule]
```

It’s the role of your app to display the message to the user, such as:

![Sample error message that reads ](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/7wBM0h29mAwFFbmeOVwVnR/e0ec360ad403d6cdf2f2ac701c621216/rules-login-error-from-rules.png)

## Retry login after a rule error

A likely next step is to request a new authorization. However, in most cases, Auth0 already knows who the user is and so doesn’t ask for login information. Instead, rules run immediately and the rule denies authorization again. This can become an endless loop.

The user needs an opportunity to provide new credentials. There are two ways your app can make the login page display again:

* Add a directive in the request to force the display of the login page:

  * Use a `prompt=login` parameter to an OIDC/OAuth2 request.
  * Use a `ForceAuthn="true"` attribute in a SAML request.

—or—

* Log the user out of Auth0 before you send a new request.

## Learn more

* [Auth0 Rules](/docs/docs/customize/rules)
* [Log Users Out of Applications](/docs/docs/authenticate/login/logout/log-users-out-of-applications)
* [Rule Use Cases](/docs/docs/customize/rules/use-cases)
