> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/docs/fr/actions/workflow-concepts/run-once/error-handling.md).

# Gestion des erreurs

Poursuivez le workflow à l'aide d'une logique en branches si l'étape renvoie une erreur

## Qu’est-ce que la gestion des erreurs ?

La gestion des erreurs vous permet de décider de ce qui se passe lorsqu’une étape échoue dans votre workflow. Vous pouvez soit interrompre l’ensemble du workflow lorsqu’une erreur se produit, soit autoriser son exécution malgré l’erreur.

Si la sortie d’une étape est essentielle pour les étapes suivantes, choisissez d’interrompre le workflow lorsque cette étape échoue. Si le workflow peut se poursuivre sans la sortie d’une étape particulière, vous pouvez le configurer pour continuer malgré les erreurs.

<figure><img src="https://344527547-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-633e45403a86a3c260488b643b33dd1e5ee67846%2Ferror-handling-01-step-failure.png?alt=media" alt="Run Code step with the When the step fails options Terminate Workflow and Continue at the bottom of the panel"><figcaption><p>Choisissez si une étape ayant échoué arrête le workflow.</p></figcaption></figure>

## Comment gérer les étapes ayant échoué

1. Sélectionnez `Continuer` au lieu de `Terminer le workflow` si l'étape échoue
2. Ajoutez une condition où la condition vérifie si `erreur` le champ provenant de l'étape existe, par ex. `step_1.error`
3. Ajoutez des étapes ou des actions alternatives à exécuter lorsqu’une erreur se produit

{% @arcade/embed url="<https://app.arcade.software/share/DKDlZVzy53bV2TOmBxNP>" flowId="DKDlZVzy53bV2TOmBxNP" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/docs/fr/actions/workflow-concepts/run-once/error-handling.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
