# Error handling for "Select columns by lookup" and in General - how to set up examples?

**URL:** <https://community.easymorph.com/t/error-handling-for-select-columns-by-lookup-and-in-general-how-to-set-up-examples/3797>\
**Category:** General Q&A\
**Created:** [July 25, 2022, 4:51am UTC](https://community.easymorph.com/t/error-handling-for-select-columns-by-lookup-and-in-general-how-to-set-up-examples/3797 "2022-07-25T04:51:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish\_jain](https://community.easymorph.com/user_avatar/community.easymorph.com/ashish_jain/32/4215_2.png) [@ashish\_jain](https://community.easymorph.com/u/ashish_jain)\
**Post date:** [July 25, 2022, 4:51am UTC](https://community.easymorph.com/t/error-handling-for-select-columns-by-lookup-and-in-general-how-to-set-up-examples/3797/1 "2022-07-25T04:51:06Z")

</div>

Hello,

I would be interested in understanding

1. how to do Error handling setup in general for Easymorph workflows and any reference to sample examples?

2. and I am using a "Select columns by lookup" action to dynamically read column names (from another config excel) to be used in downstream flows. But there will be cases where the column in the config excel will be empty and not contain any column name to be read.  
In this case the action "Select columns by lookup" will fail and throw an error. I would like to handle this error by setting some formula (like setting it to by "True") rather than throwing an error and use that formula in following flows to decide some other actions.  
How can this be handled in Easymorph?

Kindly share your inputs.

Thank you,  
Ashish

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [July 25, 2022, 4:12pm UTC](https://community.easymorph.com/t/error-handling-for-select-columns-by-lookup-and-in-general-how-to-set-up-examples/3797/2 "2022-07-25T16:12:29Z")

</div>

Hi Ashish and welcome to the Community!

> [@ashish\_jain](#):
>
> how to do Error handling setup in general for Easymorph workflows and any reference to sample examples?

Error handling can be arranged with actions "Call" or "Iterate" that have the "capture errors and continue" mode. It means that you put the workflow logic that can fail into a module, and call the module using the "Call" action in the "capture errors" mode. In this mode, even if the called module fails it doesn't stop project execution. Instead, the output of the "Call" action contains the list of errors.

See the example below:  
[error-recovery.morph](https://community.easymorph.com/uploads/short-url/jpOkRBT9xSiZH99jG6V2DeMIyRW.morph) (2.9 KB)

> [@ashish\_jain](#):
>
> I would like to handle this error by setting some formula (like setting it to by “True”) rather than throwing an error and use that formula in following flows to decide some other actions.  
> How can this be handled in Easymorph?

You can use the "Skip on condition" action explained in our tutorials: [EasyMorph | Conditional workflows](https://easymorph.com/learn/conditional-workflows.html)

Make the action skip the action “Select columns by lookup” if the list of values is empty.

---

<div class="post-metadata">

**Author:** ![ashish\_jain](https://community.easymorph.com/user_avatar/community.easymorph.com/ashish_jain/32/4215_2.png) [@ashish\_jain](https://community.easymorph.com/u/ashish_jain)\
**Post date:** [July 30, 2022, 1:18pm UTC](https://community.easymorph.com/t/error-handling-for-select-columns-by-lookup-and-in-general-how-to-set-up-examples/3797/3 "2022-07-30T13:18:46Z")

</div>

Thank you @dgudkov! Everything worked as you suggested.
