Each time I call a certain query from the discovery, it displays this error message, any idea what's wrong ?
-
I've checked my JSON documents too, it's correct(followed by the template you gave)
-
Added intents and dialogs(e.g. intents[0].confidence>0.5) as well
3)It's working weirdly only when I change
"resolve([data.results[0].title, data.results[0].text, data.results[0].url]);"
TO
"resolve(data.results[0]);"
-
By weirdly, I mean only the first result is relevant, and the second result is not.
-
Only received the error log(below) when I used
"resolve([data.results[0].title, data.results[0].text, data.results[0].url]);"
Promise { '' }
Promise { '' }
C:\Users\L31303\Desktop\New\docs-bot-master\sendBoth.js:39
resolve([data.results[0].title, data.results[0].text, data.results[0].url]);
^
TypeError: Cannot read property 'title' of undefined
at C:\Users\L31303\Desktop\New\docs-bot-master\sendBoth.js:39:41
at Request._callback (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\watson-develop
er-cloud\lib\requestwrapper.js:108:5)
at Request.self.callback (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\request\re
quest.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\request\requ
est.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\request\reque
st.js:1091:12)
at Gunzip.g (events.js:292:16)
Each time I call a certain query from the discovery, it displays this error message, any idea what's wrong ?
I've checked my JSON documents too, it's correct(followed by the template you gave)
Added intents and dialogs(e.g. intents[0].confidence>0.5) as well
3)It's working weirdly only when I change
"resolve([data.results[0].title, data.results[0].text, data.results[0].url]);"
TO
"resolve(data.results[0]);"
By weirdly, I mean only the first result is relevant, and the second result is not.
Only received the error log(below) when I used
"resolve([data.results[0].title, data.results[0].text, data.results[0].url]);"
Promise { '' }
Promise { '' }
C:\Users\L31303\Desktop\New\docs-bot-master\sendBoth.js:39
resolve([data.results[0].title, data.results[0].text, data.results[0].url]);
^
TypeError: Cannot read property 'title' of undefined
at C:\Users\L31303\Desktop\New\docs-bot-master\sendBoth.js:39:41
at Request._callback (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\watson-develop
er-cloud\lib\requestwrapper.js:108:5)
at Request.self.callback (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\request\re
quest.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\request\requ
est.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (C:\Users\L31303\Desktop\New\docs-bot-master\node_modules\request\reque
st.js:1091:12)
at Gunzip.g (events.js:292:16)