# After\_failure not triggering

**URL:** <https://travis-ci.community/t/after-failure-not-triggering/3184>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [April 26, 2019, 10:18pm UTC](https://travis-ci.community/t/after-failure-not-triggering/3184 "2019-04-26T22:18:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stanzilla](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/stanzilla/32/1693_2.png) [@Stanzilla](https://travis-ci.community/u/Stanzilla)\
**Post date:** [April 26, 2019, 10:18pm UTC](https://travis-ci.community/t/after-failure-not-triggering/3184/1 "2019-04-26T22:18:22Z")

</div>

Hey there, we have a build failure over here [https://travis-ci.org/WeakAuras/WeakAuras2/builds/525153306?utm\_source=github\_status&utm\_medium=notification](https://travis-ci.org/WeakAuras/WeakAuras2/builds/525153306?utm_source=github_status&utm_medium=notification) but the after\_failure part is not executed. Any idea why?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [April 26, 2019, 11:02pm UTC](https://travis-ci.community/t/after-failure-not-triggering/3184/2 "2019-04-26T23:02:59Z")

</div>

I believe that nonzero exits before `script` (in this case, `before_script`):

> <https://github.com/WeakAuras/WeakAuras2/blob/8e2f2844e1bbe88da9da2f9c25aaee017eba2fdd/.travis.yml#L13>

is considered a failure, but, rather, an error, as indicated in the status.

---

<div class="post-metadata">

**Author:** ![Stanzilla](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/stanzilla/32/1693_2.png) [@Stanzilla](https://travis-ci.community/u/Stanzilla)\
**Post date:** [April 26, 2019, 11:12pm UTC](https://travis-ci.community/t/after-failure-not-triggering/3184/3 "2019-04-26T23:12:18Z")

</div>

Hrm would moving to script and after\_script help then?

---

<div class="post-metadata">

**Author:** ![Stanzilla](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/stanzilla/32/1693_2.png) [@Stanzilla](https://travis-ci.community/u/Stanzilla)\
**Post date:** [April 26, 2019, 11:32pm UTC](https://travis-ci.community/t/after-failure-not-triggering/3184/4 "2019-04-26T23:32:11Z")

</div>

Or I guess the better way would be to move my before\_script to script and my script to after\_sucess, otherwise it would always run since after\_script still runs even if the job failed
