Try/Catch with Variables

Following this question: Try Catch (xano.com) would like to extend what is the best practice for Variables and Lambda functions with a Try/Catch?

Example:

I have a lambda function X that processes data from an external API. If it is successful it creates a variable Y by collecting the data entries. I then have a totally not related lambda function Z that sanitizes some data from another part of the XANO function stack.

  • If I have 2 variable definitions and the first one fails, will the second one also fail if they are inside the same Try/Catch? What would be best run option in the examples:

Example 1:

Try

Lambda function X

Variable Y

Lambda function Z

Catch

Example 2:

Try

Lambda function X

Variable Y

Catch

Try

Lambda function Z

Catch

Thank you very much.

Other
1 reply