Permalink
Browse files

Merge pull request #5 from davidtucker/master

Pass Through the Error from the Request Validation to Callback
  • Loading branch information...
2 parents 6f668f2 + ed27765 commit ce44a94c1215ae77c35b30b7040ccbcb4c042c84 @mattrobenolt committed Mar 5, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/snsclient.js
View
@@ -121,7 +121,9 @@ function SNSClient(opts, cb) {
return cb(new Error('Error parsing JSON'));
}
validateRequest(opts, message, function(err){
- if(err) return;
+ if(err) {
+ return cb(err);
+ }
if(message.Type === 'SubscriptionConfirmation') {
return https.get(url.parse(message.SubscribeURL));
}

0 comments on commit ce44a94

Please sign in to comment.