simple try Open in playground export const main = asl.deploy.asStateMachine(async () => { try { lambda(); } catch { return "it failed"; } }); simple multiple statements Open in playground export const main = asl.deploy.asStateMachine(async () => { try { const withinTry = lambda(); return withinTry; } catch { return "it failed"; } }); try around pass state Open in playground export const main = asl.deploy.asStateMachine(async () => { try { return "this cannot fail"; } catch { return "this never happens"; } }); try finally Open in playground export const main = asl.deploy.asStateMachine(async () => { try { lambda(); } finally { return "finally"; } }); try catch finally Open in playground export const main = asl.deploy.asStateMachine(async () => { try { lambda(); } catch { console.log("failed") } finally { return "finally"; } });