I use skill with MongoDb user persistence. When I was testing my skill locally and assigning some data to the user data object to be persisted f.e.
this.$user.$data.locale = this.getLocale()
Everything was working fine, property got saved to the DB with other metadata I wanted.
But when I deployed my ‘skill’ to lambda it started saying:
Cannot set property 'locale' of undefined
After trying to log $user
object it was apparent that $data
object is missing. When I removed locale assignment I got:
Cannot read property 'createdAt' of undefined
For the lambda handler I use default one, that comes from the example skill.
As I said, when I test skill locally, using jovo debugger, everything works, but when I deploy it to lambda this happens. I guess there is a difference between this
in lambda compared to locale environment or are there any other issues I should be aware of?