# How to display error message when API call failed?

**URL:** <https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571>\
**Category:** How do I?\
**Created:** [May 13, 2024, 9:07am UTC](https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571 "2024-05-13T09:07:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davy](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@Davy](https://community.weweb.io/u/Davy)\
**Post date:** [May 13, 2024, 9:07am UTC](https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571/1 "2024-05-13T09:07:27Z")

</div>

Hi,

I was wondering how to deal with API error:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7be429acea70f621a2d355955997235649707fa9.png)

At times, an API call encounters an error, causing my workflow to halt. Unfortunately, this prevents me from extracting the error message to display it to the user or to understand what went wrong. How can I ensure that the error message is displayed even if the workflow stops?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [May 13, 2024, 12:37pm UTC](https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571/2 "2024-05-13T12:37:05Z")

</div>

You can use the “on error” branch of your workflow, once the xano api request fail it will execute the on error branch

---

<div class="post-metadata">

**Author:** ![Davy](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@Davy](https://community.weweb.io/u/Davy)\
**Post date:** [May 13, 2024, 12:52pm UTC](https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571/3 "2024-05-13T12:52:37Z")

</div>

Hi thanks @Alexis ,

But what does it mean exactly?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/cba2e903dfacc6cf5031c2dc73ee41d0359a26c0.png)

I have set up a condition after the API called based on an error and yet it doesn’t trigger it.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [May 13, 2024, 12:58pm UTC](https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571/4 "2024-05-13T12:58:10Z")

</div>

![Capture d’écran 2024-05-13 à 14.57.14](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/1531bcf349787e998d1752f9862dbec209f142ff.jpeg)

The workflow will continue on the “On error” tab

---

<div class="post-metadata">

**Author:** ![Davy](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@Davy](https://community.weweb.io/u/Davy)\
**Post date:** [May 13, 2024, 2:55pm UTC](https://community.weweb.io/t/how-to-display-error-message-when-api-call-failed/8571/5 "2024-05-13T14:55:01Z")

</div>

thank you all good!
