# How to abort the deployment if the download\_enter state script fails

**URL:** <https://hub.mender.io/t/how-to-abort-the-deployment-if-the-download-enter-state-script-fails/4130>\
**Category:** General Discussions\
**Created:** [September 29, 2021, 8:08am UTC](https://hub.mender.io/t/how-to-abort-the-deployment-if-the-download-enter-state-script-fails/4130 "2021-09-29T08:08:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [September 30, 2021, 5:09pm UTC](https://hub.mender.io/t/how-to-abort-the-deployment-if-the-download-enter-state-script-fails/4130/3 "2021-09-30T17:09:51Z")

</div>

There is a [sample implementation here](https://hub.mender.io/t/rootfs-with-explicit-version-check/1682) for an update module that checks the version and makes sure that it never goes backward.

It looks like there is [no error flow](https://docs.mender.io/artifact-creation/state-scripts) when using the Download state scripts. This is consistent with your report of the deployment being still active. It _may_ be possible to use an ArtifactIInstall\_Enter state script to get the desired behavior rather than using a custom update module.

Drew

---

_[View the full topic](https://hub.mender.io/t/how-to-abort-the-deployment-if-the-download-enter-state-script-fails/4130)._
