You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I can add a question (this is my first experience with aws lambda) why is that when callback(error) gets called with a non empty error, the error gets logged but the user making the request is getting an empty response (I would expect an error response also there per http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-mode-exceptions.html )
serverless-crud/todos-read-all.js
Line 13 in 8096b82
when dynamoDb.scan gives an error, both callback(error) and callback(error, data.Items) get called.
In my case the database is giving an error (AccessDeniedError) and since data is null the code breaks in data.Items and the error is hidden.
I think that a return statement must be added in the if(error) case.
The text was updated successfully, but these errors were encountered: