service-cloud-voice / ServiceCloudVoiceLambdas

This application provides a set of Lambda functions, which are available within your Amazon Connect instance after provisioning the instance with your Service Cloud Voice contact center. You can use these Lambdas in Amazon Connect contact flows.
BSD 3-Clause "New" or "Revised" License
14 stars 18 forks source link

Fixed circular loop detection in SCVLoggingUtil #15

Closed wbkostan closed 2 years ago

wbkostan commented 2 years ago

The SCVLoggingUtil.js file (which is duplicated in several of the lambda functions in this repository), has a logical error in the getCircularReplacer function which is used in error logging. This error prevents the circular replace from functioning correctly, resulting in secondary exceptions whenever the primary error context contains a circular structure.

This function corrects the logical issue so that the circular replace works as originally intended, preventing secondary errors so the primary exception is correctly logged.

jinalkathiara commented 2 years ago

We are addressing this in the upcoming release. We are replacing the logging infra. I will close this PR and not merge it. Since newer version of the lambda will not have this problem.