1

Is it possible to capture a thrown error message from a lambda function in Amazon Connect?

Example lambda throwing an error:

exports.handler = async (event) => {
    throw new Error('some error message')
};

I would like to use the error message in a voice prompt, without catching the error.

Ermiya Eskandary
  • 15,323
  • 3
  • 31
  • 44
denysonique
  • 16,235
  • 6
  • 37
  • 40

2 Answers2

0

When a synchronous invocation returns an error, Amazon Connect retries up to 3 times, for a maximum of 8 seconds. At that point, the flow will progress down the Error branch.

An Error branch, is this what you want? see document

izayoi
  • 129
  • 5
-1

Yes, just return it in the response and then access via contact attribute.

B... James B.
  • 136
  • 1
  • 8