# How to know if a build fails due to timeout

**URL:** https://discuss.bitrise.io/t/how-to-know-if-a-build-fails-due-to-timeout/17104
**Category:** Question & Answer
**Tags:** step
**Created:** [June 4, 2021, 10:28pm UTC](https://discuss.bitrise.io/t/how-to-know-if-a-build-fails-due-to-timeout/17104 "2021-06-04T22:28:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ernesto-flores](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@ernesto-flores](https://discuss.bitrise.io/u/ernesto-flores)
#### Post date: [June 4, 2021, 10:28pm UTC](https://discuss.bitrise.io/t/how-to-know-if-a-build-fails-due-to-timeout/17104/1 "2021-06-04T22:28:29Z")

</div>

I set up the timeout as it is mention here: [https://devcenter.bitrise.io/bitrise-cli/step-timeout/](https://devcenter.bitrise.io/bitrise-cli/step-timeout/)  
And in the logs I got successfully `ERRO[18:59:13] Step (Run local my-step) failed: timed out`

I have an outgoing Webhook for all the events, and when the timeout happens Bitrise sends:  
` **Bitrise-Event-Type:** build/finished`  
and in the payload:  
`"build_status": 2`  
As you can see this just says that the build fails  
and when I request the build on `https://api.bitrise.io/v0.1/apps/${appSlug}/builds/${buildSlug}`  
It does not give me the reason that the build fails due to timeout.

The next step is also a bash script which POST several parameters to my server, I don’t know if in this step I can set a parameter that the build fails due to timeout since I don’t know how to catch this reason on the previous step, another idea could be triggering a different event from Bitrise.  
What do you think? Thanks in advance

---

<div class="post-metadata">

### Author: ![cathy.harmon](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/cathy.harmon/32/2674_2.png) [@cathy.harmon](https://discuss.bitrise.io/u/cathy.harmon)
#### Post date: [June 7, 2021, 7:28pm UTC](https://discuss.bitrise.io/t/how-to-know-if-a-build-fails-due-to-timeout/17104/2 "2021-06-07T19:28:29Z")

</div>

Hello,

Did you build fail due to a timeout, or was it just the step that failed due to the timeout?

cathy

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)
#### Post date: [July 7, 2021, 7:40pm UTC](https://discuss.bitrise.io/t/how-to-know-if-a-build-fails-due-to-timeout/17104/4 "2021-07-07T19:40:46Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
