> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Assistant

> Get a suggested fix for a compile error from the logs, then apply it or leave it.

> [!NOTE]
>
> If a log entry has no **Suggest fix** button, see [AI Integration](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/overleaf-toolkit/integrations/ai-integration.md) for your administrator.

**1. Open the logs**

After a compile with errors, a red count appears on the logs icon next to **Recompile**, and a red dot marks the line in the editor. Click the icon. If the compile produced no PDF, the logs are already open.

![A line with a red dot in the editor and the logs icon with a red 1](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/error-assistant-failed.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=134281257e23c3a288dfc141942491d6)

A compile with one error

**2. Click Suggest fix**

Click the sparkle icon, **Suggest fix**, on the right of the log entry. Warnings that point to a file of your project have it too.

![An Undefined control sequence log entry with the Suggest fix button](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/error-assistant-suggest-fix.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=a97233985be07983b7ddfe34aaa61f44)

The Suggest fix button

The first time, the entry says **Before you use Error Assist**. Click **Accept and continue**. You do this once, and it also covers the [AI Assistant](https://ayakaleaf-pro.mintlify.site/on-premises/user-guide/users/ai-assistant.md).

![The Before you use Error Assist prompt with an Accept and continue button](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/error-assistant-consent.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=34b9df89e96ed6b45747dffd83e4bdcb)

Shown once

**3. Read the suggestion**

The entry explains the error and shows the line to change, the old text on the **-** row and the new text on the **+** row. Clicking the line number takes you to that line in the editor, and the copy icon copies the new text.

![A suggested fix with an explanation, the old and new line, and an Apply suggestion button](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/error-assistant-suggestion.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=059320c2eacdd4e2c1b3a8d2e57ae6aa)

A suggested fix

If the assistant has no fix, it only explains, and there is nothing to apply. The refresh icon, **Suggest a different fix**, asks again.

**4. Apply it or leave it**

To apply it, click **Apply suggestion**. The line changes in the editor, the entry says **Suggestion applied** and the project recompiles. Once no error is left, the PDF comes back. To take the change back, press `Ctrl+Z` in the editor.

![The corrected line in the editor and the log entry saying Suggestion applied](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/error-assistant-applied.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=0a905534110529f4bc78a92001f4dc68)

The fix is applied

To reject it, do nothing: there is no reject button, and the document stays as it is until you click **Apply suggestion**.

If you edit that line first, **Apply suggestion** is disabled. Click **Suggest a different fix** for a new suggestion.

## Find the suggestion again

After the next compile, the logs list the suggestion as **Last suggested fix**, whether you applied it or not. Click the arrow to open it.

![The Last suggested fix log entry, opened](https://mintcdn.com/ayakaleaf-pro/IsGnx0wnzqtV4hI8/images/on-premises/error-assistant-last-fix.png?fit=max\&auto=format\&n=IsGnx0wnzqtV4hI8\&q=85\&s=c9c95745d0b0c7a14124d3db75c57943)

The last suggestion stays in the logs

The Error Assistant counts towards the same limit as the AI Assistant, see [Token usage](https://ayakaleaf-pro.mintlify.site/on-premises/user-guide/users/ai-assistant.md#token-usage).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.