Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNRESET #93

Open
rajnish-kumar-76 opened this issue Oct 2, 2017 · 3 comments
Open

ECONNRESET #93

rajnish-kumar-76 opened this issue Oct 2, 2017 · 3 comments

Comments

@rajnish-kumar-76
Copy link

HI,
I have tried same text request but I always got "ECONNRESET" response from apiai.
sample nodejs code as below. In the code I have hashed client access token used retrieved from apiai console.

`'use strict'

const apiai = require('apiai');
const apiaiClient = apiai("08628*******781*****6e");

var options = {
sessionId: '879uy73883'
};

console.log("options object being sent is: %s", JSON.stringify(options));
var apiaiRequest = apiaiClient.textRequest('Hello', options);
apiaiRequest.on('response', function(response) {
console.log("Response received from apiai: %s", JSON.stringify(response));
});
apiaiRequest.on('error', function(error) {
console.log("Error received from apiai: %s", JSON.stringify(error));
});`

Regards,
-Rajnish

@NoobTW
Copy link

NoobTW commented Oct 8, 2017

How about add an apiaiRequest.end(); in the end of your code?

@rajnish-kumar-76
Copy link
Author

This doesn't help. Same response. Output from node is :-
options object being sent is: {"sessionId":"879uy73883"}
Error received from apiai: {"code":"ECONNRESET"}

@gbahamondezc
Copy link

gbahamondezc commented Oct 10, 2017

Same error here.

EDIT: For me request.end() really work as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants