jed/dynamo — Issue #4: Fail to get an item from dynamo table (parsing error?)
Author: Jae
Created: 2012-02-27 23:00:08+00:00
State: open

raw response from dynamoDB below fails when Attributes.prototype.parse(data)

{
ConsumedCapacityUnits: 0.5,
Item:
{
name: { S: 'Christian Lewis' },
id: { S: '28664d40-6195-11e1-8d85-0be46e39396b' },
screen_name: { S: 'Tyler Young' }
}
}

I'm suspecting it's to do with ConsumedCapacityUnits

Am I not supposed to do table.get(key).fetch(opts, cb)?

It's basically failing to parse the raw response from Dynamo with stacktrace below

TypeError: Object.keys called on non-object
at Function.keys (native)
at Object.parse (node_modules/dynamo/lib/Value.js:17:23)
at node_modules/dynamo/lib/Attributes.js:20:34
at Array.forEach (native)
at Object.parse (node_modules/dynamo/lib/Attributes.js:18:23)
at node_modules/dynamo/lib/Item.js:54:32
at node_modules/dynamo/lib/Database.js:67:44
at IncomingMessage. (node_modules/dynamo/lib/Request.js:38:43)