aws-event-emitter
Advanced tools
Comparing version 1.0.0 to 1.1.0
15
index.js
@@ -282,10 +282,7 @@ 'use strict'; | ||
if ( decodedBody.Subject !== 'event' ) { | ||
callback( 'AWSEventEmitter Got unknown message subject: ' + decodedBody.Subject ); | ||
return; | ||
} | ||
let decodedMessage = null; | ||
try { | ||
decodedMessage = JSON.parse( decodedBody.Message ); | ||
decodedMessage = extend( { | ||
aws: decodedBody | ||
}, JSON.parse( decodedBody.Message ) ); | ||
} | ||
@@ -336,2 +333,8 @@ catch ( ex ) { | ||
if ( !decoded.eventName ) { | ||
self.emit( 'error', 'No eventName in event (skipping): ' + JSON.stringify( decoded ) ); | ||
next(); | ||
return; | ||
} | ||
self._emit( decoded.eventName, decoded.event ); | ||
@@ -338,0 +341,0 @@ next(); |
{ | ||
"name": "aws-event-emitter", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "An event system using AWS SNS/SQS.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24873
654