# Continue failed batchPlay chain

**URL:** <https://forums.creativeclouddeveloper.com/t/continue-failed-batchplay-chain/3041>\
**Category:** UXP Plugin API\
**Created:** [June 6, 2021, 12:39pm UTC](https://forums.creativeclouddeveloper.com/t/continue-failed-batchplay-chain/3041 "2021-06-06T12:39:21Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [June 7, 2021, 3:07pm UTC](https://forums.creativeclouddeveloper.com/t/continue-failed-batchplay-chain/3041/8 "2021-06-07T15:07:39Z")

</div>

As Kerri said:

> [@How to save a file](http://forums.creativeclouddeveloper.com/t/how-to-save-a-file/2678/5):
>
> `batchPlay` is returning you an error in `result` ( `batchPlay` generally doesn’t `throw` )

I don’t think there is a mechanism (yet) to continue a batchPlay stack once an error occured.  
Maybe you could

- Validate beforehand whether the layers you want to remove exist
- Check for any error message in the returned descriptor array. If there is an error, you could theoretically rerun the whole stack, starting at the next descriptor relative to where the error happened.

---

_[View the full topic](https://forums.creativeclouddeveloper.com/t/continue-failed-batchplay-chain/3041)._
