-
Notifications
You must be signed in to change notification settings - Fork 153
Bug: regression when passing null
as extra arg in logging methods
#3613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @arturldev, thank you for reporting this. I have tried the case you described and was able to confirm the regression. I have already opened a PR to handle this case, which will correct the regression in the next release (ETA 25/02). In the meanwhile I would suggest reverting back to v2.13.1 or its corresponding Lambda layer version v19. This was not an intended change but rather a regression in behavior caused by a bug we introduced. For this to be a breaking change, it would have needed to be intentional - which is not the case. We take stability between patch and minor releases seriously, but unfortunately sometimes bugs can happen when refactoring or adding new features. This regression was likely introduced in #3553, and our existing test suite did not catch it. As mentioned I have already implemented a fix which will be merged soon and also introduced additional test cases to prevent further regression in this specific case where We regret any inconvenience this regression might have caused to you / your workload. |
null
as extra arg in logging methods
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.15.0 version! |
Expected Behavior
Minor releases should not have breaking changes and minor upgrade should be effortless (see https://docs.npmjs.com/about-semantic-versioning).
The following code:
logger.info('Hello World', null);
Works fine in version 2.13.1 and below, but breaks in version 2.14.0 and throws an error:
TypeError: Cannot convert undefined or null to object
Current Behavior
logger.info('Hello World', null);
Throws an error:
TypeError: Cannot convert undefined or null to object
Code snippet
logger.info('Hello World', null);
Steps to Reproduce
logger.info('Hello World', null);
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
2.14.0
AWS Lambda function runtime
20.x
Packaging format used
Lambda Layers
Execution logs
The text was updated successfully, but these errors were encountered: