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

# When something goes wrong

> Worked and failed paths, If something breaks, and the Heads up tag.

Sometimes a block cannot do its job. Maybe the bot's role is too low to give a role, or a member has their DMs closed. DogeBot gives you three ways to deal with it.

## 1. The worked and failed paths (one block)

Many blocks can have two extra ways out:

* a **green** path: what to do if it **worked**
* a **red** path: what to do if it **failed**

Each path has its own **+** button. Press the red **+** and add, for example, a **Reply**: `I couldn't give you the role. Please tell a moderator.`

Now only that one block is handled, and the rest of your command carries on normally.

## 2. If something breaks (the whole command)

Press the **first block** of your command. Its settings have a part called **If something breaks**. This decides what happens when **any** block fails and you did not add a red path for it:

| Choice | What happens |
| - | - |
| **Explain the problem** | The bot tells the person, in simple words, what went wrong. |
| **My own message** | The bot sends a message you write, like "Oops! Try again later." |
| **Stay silent** | The bot says nothing. |
| **Alert a staff channel** | The bot tells your staff in a channel you pick, so they can fix it. |
| **Skip the broken block and continue** | The bot skips the block that failed and does the rest. |

This also works for events and WhatsApp flows.

## 3. Heads up, before it even runs

The builder checks your blocks while you build. If it thinks a block will fail, the block gets a **Heads up** tag. Press it to see why and fix it before anyone uses the command.

## Then: find and fix

Every failure is saved in **Error Logs** with who ran it, where, when and the values at that moment. Press **Open the block** to jump right to it. See [Error Logs](/the-builders/error-logs).

## The most common reasons blocks fail

| Problem | Fix |
| - | - |
| The bot cannot give or remove a role. | In your server settings, drag your bot's role **above** the role it should give. |
| The bot cannot post in a channel. | Give the bot permission to see and write in that channel. |
| A DM did not arrive. | The member has DMs from server members turned off. Add a red path that replies in the channel instead. |
| The bot cannot kick, ban or time out someone. | The bot needs that permission, and its role must be above the member's highest role. Nobody can act on the server owner. |
| A message event does nothing. | Turn on the **Message Content Intent** in the Discord Developer Portal. |
| A join or leave event does nothing. | Turn on the **Server Members Intent**. |


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