First time invocation failed


#1

Hi
I have stange issue, when i start first time invocation, it’s fail.
i restart again in few second, it success.
i check log and see this. but dont get what happen.

log :

code :


#2

This seems like an async issue.

I suggest creating a function that does the parsing, and then calling it with await from your handlers. This way, you can make sure that the data is retrieved before the response is returned


#3

hum, i dont know how.
but when try in local, it’s work fine.
how is possible ?


#4

#6

if i follow this


my var will not be global, so all Intent need call many time function


#7

You can store it into the Jovo app object: this.$app.$data.weektitre = ...

e.g.

ON_REQUEST() {
    if(typeof this.$app.$data.weekTitre === 'undefined') {
        this.$app.$data.weekTitre = await getPodcastData();
    }
}

Learn more about app data and different data types here:


#8

it’s seems now ok
big thanks for your help