Basic logging mechanism for Node.js Lambda Functions and other AWS services, which produces logs in JSON format for easier reading through Cloudwatch Logs.
TypeError: Cannot assign to read only property 'toJSON' of object 'ValidationError: XXXXXX'
at Function.stubError (\node_modules\lambda-log\lib\LogMessage.js:231:16)
at LogMessage.get meta [as meta] (\node_modules\lambda-log\lib\LogMessage.js:112:32)
at LogMessage.get value [as value] (\node_modules\lambda-log\lib\LogMessage.js:174:15)
at LogMessage.toJSON (\node_modules\lambda-log\lib\LogMessage.js:206:27)
at LambdaLog.log (\node_modules\lambda-log\lib\LambdaLog.js:156:36)
...
What were you expecting to happen?
not to throw an error
...
Steps to reproduce
Define a read-only toJSON function on an error object
What happens?
TypeError: Cannot assign to read only property 'toJSON' of object 'ValidationError: XXXXXX' at Function.stubError (\node_modules\lambda-log\lib\LogMessage.js:231:16) at LogMessage.get meta [as meta] (\node_modules\lambda-log\lib\LogMessage.js:112:32) at LogMessage.get value [as value] (\node_modules\lambda-log\lib\LogMessage.js:174:15) at LogMessage.toJSON (\node_modules\lambda-log\lib\LogMessage.js:206:27) at LambdaLog.log (\node_modules\lambda-log\lib\LambdaLog.js:156:36) ...
What were you expecting to happen?
not to throw an error ...
Steps to reproduce
Environment
Operating System: ubuntu+windows10 Node Version: 14.17 Lambda Log Version: 3.0.1