Fix NotificationHandler for Node 24 Lambda runtime (v8.0.1)#62
Merged
Conversation
The wrapped SNS handler declared a 3-argument `(event, context, callback)` signature. Node 24's Lambda runtime rejects callback-style handlers at init with `Runtime.CallbackHandlerDeprecated`, even when the callback is never invoked. Drop the callback parameter and let promise rejection propagate, which matches what the other handler wrappers in this package already do. Fixes #58.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 82.88% 83.14% +0.26%
==========================================
Files 24 24
Lines 625 623 -2
Branches 148 148
==========================================
Hits 518 518
+ Misses 105 103 -2
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NotificationHandlerwrapped an SNS handler with a 3-argument(event, context, callback)signature. Node 24's Lambda runtime rejects callback-style handlers at init withRuntime.CallbackHandlerDeprecated, even when the callback is never invoked, so any function built withNotificationHandlerfails immediately onnodejs24.x.callbackparameter and lets promise rejection propagate naturally — the pattern the other wrappers (QueueHandler,EventHandler, etc.) already use.8.0.1.Test plan
git checkout main && git pull && git tag v8.0.1 && git push origin v8.0.1.npm view @faceteer/cdk dist-tagsshowslatest: 8.0.1andalpha: 8.0.1-alpha.1.NotificationHandler, pin@faceteer/cdk@8.0.1, deploy a Lambda onnodejs24.x, and confirm cold start succeeds and SNS messages are processed.