freshworks/marketplace-sample-apps

[Bug] - Client db update add a "#" to the item key

alkanna opened this issue · 3 comments

Describe the bug
I have this in my module localstore in local development :

"myapp:ticket:16_freshdesk":{"linkedTasks":["MOB-293"],"createdAt":1617552621160,"updatedAt":1617560777821}

I then want to remove one of the items of this array, like this :

client.db.update(key, 'remove', 'linkedTasks.MOB-293')

This works perfectly fine in local development, however, when using this code in production, I get this :

ExpressionAttributeNames contains invalid key: Syntax error; key: \"#MOB-293\""

Where does that "#" come from ?
Did I do something wrong here ?

Hi @alkanna,

Is this an issue in any one of the samples from this repository? If so, could you share the link to the folder or specific file?

If not, could you please close this issue and start a thread on our developer forum to report the issue or discuss it? We have peer-developers and platform experts in our community who use this forum to discuss any queries and issues on our platform.

Thank you!

Hey,

Turns out it was because I could only query json objects and not arrays with this method.
I'm pretty sure this is a limitation from DynamoDB that you guys are using in production, hence why it's working with the fdk server.

What would be nice though, is if the sdk could have similar behaviour as your production environment regarding this particular issue :)

@alkanna ,

Understood, I've created a topic on the Feedback category on the community forum.

We will work on this and follow up. Appreciate you reporting the issue, @alkanna