-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Full Error :
`Like following example:
var app = ...
request = app.textRequest("Hello", {sessionId: "UNIQUE_SESSION_ID"})
...
at TextRequest.QueryRequest (/Users/sushantshekhar/Work/bot_api.ai/node_modules/api.ai/apiai/module/query_request.js:40:15)
at new TextRequest (/Users/sushantshekhar/Work/bot_api.ai/node_modules/api.ai/apiai/module/text_request.js:17:24)
at Application.textRequest (/Users/sushantshekhar/Work/bot_api.ai/node_modules/api.ai/apiai/module/apiai.js:168:12)
at /Users/sushantshekhar/Work/bot_api.ai/node_modules/api.ai/lib/textRequest.js:21:59
at Promise._execute (/Users/sushantshekhar/Work/bot_api.ai/node_modules/bluebird/js/release/debuggability.js:300:9)
at Promise._resolveFromExecutor (/Users/sushantshekhar/Work/bot_api.ai/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/Users/sushantshekhar/Work/bot_api.ai/node_modules/bluebird/js/release/promise.js:79:10)
at Application.text (/Users/sushantshekhar/Work/bot_api.ai/node_modules/api.ai/lib/textRequest.js:17:48)
at Object.<anonymous> (/Users/sushantshekhar/Work/bot_api.ai/fun.js:9:5)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)`
Full Code:
`const apiai = require("api.ai");
const nlp = new apiai({
token: "token_was_here",
session: "some_key"
});
nlp.text("Hello World!")
.then(function (response) {
console.log(response.result);
// Do what you wish with response
})
.error(function (error) {
console.log(error);
// Handle error
});`
Error Comes when i try to use Promise Code.The Callback Code works Fine!
Metadata
Metadata
Assignees
Labels
No labels