opened
somprabhsharma
username_0
I am getting this error most of the times while fetching batch items from dynamodb. 
`1 validation error detected: Value '[]' at 'requestItems.Auth.member.keys' failed to satisfy constraint: Member must have length greater than or equal to 1`

I can understand that it is a validation error means what I am querying is somewhere wrong. 
But please can you explain when this error comes ? I searched about it everywhere but unable to find a reason for it. 

My request looks like this-
`var keys = [{uid: {'S':'sasdfa'}}, .... ,{uid: {'S':'sasdfa'}}]
var batchParams = {RequestItems: {'Auth': { Keys: keys,ConsistentRead: false}}}
dynamoDb.batchGetItem(batchParams, function (err, data) {})`
Keep getting error in batchGetItem in dynamodb
issue
created
somprabhsharma
username_0
@AdityaManohar Please provide information on this ?
comment
created
LiuJoyceC
username_1
Hi @username_0 
Thanks for reporting the issue. I'm looking into this.
comment
created
LiuJoyceC
username_1
Hi @username_0 
It looks like this error is coming from the service, not from the SDK, as the SDK does not display the error you provided above for param validation. I could not reproduce the error with the example you provided above. Can you log out `this.httpResponse.body` and `this.httpResponse.statusCode` inside the callback function you supplied to `batchGetItem`? If these are defined, then the error is coming from the service's response, not from the SDK. Can you verify if that is the case?
comment
created
somprabhsharma
username_0
I am also not able to reproduce the issue with all possible scenarios of invalid or valid input in my dev environment. But the error is coming more than 100 times a minute in production. That is why I needed your help to determine the possible cause of this scenario.
comment
created
chrisradek
username_2
@username_0 
Is it possible that sometimes your `keys` array has a length of 0? That's what the validation error is suggesting. If you add a check to ensure that you only call `batchGetItem` when `keys.length >== 0`, do you still see these errors?
comment
closed
jeskew
username_3
issue
created
jeskew
username_3
Closing due to inactivity. If checking the keys array as described in the previous comment does not resolve the original problem faced, please feel free to reopen this issue.
comment