awspilot / dynamodb-oop

Speak fluent DynamoDB, write code with fashion, I Promise() 😃
https://awspilot.dev
MIT License
119 stars 28 forks source link

InvalidParameterType #25

Closed randeepbhatia closed 7 years ago

randeepbhatia commented 8 years ago

Hi When I try to perform the query by using .select(DynamoDB.ALL). It raises exception { [InvalidParameterType: Expected params.AttributesToGet[0] to be a string] message: 'Expected params.AttributesToGet[0] to be a string', code: 'InvalidParameterType', time: Tue Jun 07 2016 23:30:16 GMT-0700 (PDT) }

adrianpraja commented 8 years ago

can you try DynamoDB.ALL_ATTRIBUTES please and let me know it that worked

adrianpraja commented 8 years ago

Also "DynamoDB" part of DynamoDB.ALL should be the name of your aws-dynamodb object instance

DynamoDB.table(...).select( DynamoDB.ALL ) or varname.table('...').select( varname.ALL )

randeepbhatia commented 8 years ago

This is my global var var DynamoDB = require('aws-dynamodb')(config.AWS_CONFIG); And i have tried both ALL_ATTRIBUTES & ALL, it raises me same exception. Also is it only supposed to work with queries or it can work with table scans also.

adrianpraja commented 8 years ago

please try to run the same with logging on

DynamoDB.on('error', function( operation, error, payload ) {
    console.log( operation, error, payload )
})

remove the actual data from the payload and paste it here

adrianpraja commented 7 years ago

Im closing this, please re-open if you still have the issue.thanks