ts2asl
ts2asl copied to clipboard
support caught error to be rethrown
would be great to allow errors to be rethrown:
example:
export const main = asl.deploy.asStateMachine(async (input: Input) => {
try {
throw new RethrowMe("bad luck");
} catch (err) {
if (err.error === "Error") {
throw err;
}
}
});
for now this seems not possible as the asl.fail
state doesn't allow error
or cause
to be bound to a variable.