TypeError: tag.match is not a function
ddbhagat opened this issue · 2 comments
What happens?
While running the test cases I am getting this error.
TypeError: tag.match is not a function
TypeError: tag.match is not a function
at /node_modules/lambda-log/lib/LogMessage.js:148:26
at Array.map ()
at LogMessage.get tags [as tags] (node_modules/lambda-log/lib/LogMessage.js:139:17)
at LogMessage.get value [as value] (node_modules/lambda-log/lib/LogMessage.js:176:43)
at LogMessage.toJSON (node_modules/lambda-log/lib/LogMessage.js:207:27)
at LambdaLog.log (node_modules/lambda-log/lib/LambdaLog.js:154:36)
at LambdaLog. [as error] (node_modules/lambda-log/lib/LambdaLog.js:118:54)
at OrderService._enrollInSubscription (src/libs/service/order/OrderService.js:45:1104)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
...
What were you expecting to happen?
No issues expected
...
Steps to reproduce
- ...
- ...
- ...
Any logs, output, examples?
TypeError: tag.match is not a function
at /node_modules/lambda-log/lib/LogMessage.js:148:26
at Array.map ()
at LogMessage.get tags [as tags] (node_modules/lambda-log/lib/LogMessage.js:139:17)
at LogMessage.get value [as value] (node_modules/lambda-log/lib/LogMessage.js:176:43)
at LogMessage.toJSON (node_modules/lambda-log/lib/LogMessage.js:207:27)
at LambdaLog.log (node_modules/lambda-log/lib/LambdaLog.js:154:36)
at LambdaLog. [as error] (node_modules/lambda-log/lib/LambdaLog.js:118:54)
at OrderService._enrollInSubscription (src/libs/service/order/OrderService.js:45:1104)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
...
Environment
Operating System: ... Linux
Node Version: ... v14.18.1
Lambda Log Version: ...^3.1.0
This was due to incorrect sequence of error message and tags in error log.
Correct seqence for logging function error(msg: string | Error, meta?: object, tags?: string[])