dialogflow / dialogflow-nodejs-client

Node.js SDK for Dialogflow
Apache License 2.0
659 stars 287 forks source link

500 server error on "textRequest". started today. #115

Closed joechoi-git closed 5 years ago

joechoi-git commented 5 years ago

const apiAiRequest = this.apiAiClient.textRequest(phrase, { lang: 'en', sessionId: sessionId, }); apiAiRequest.on('response', function(response) { console.log('Api.ai response', JSON.stringify(response)); //, null, 4 let result = parseApiAiResponse(response.result, phrase); callback(result); }); apiAiRequest.on('error', function(error) { console.log('Api.ai response', error); callback(error); }); apiAiRequest.end();

app error { ServerError: Wrong response status code. at IncomingMessage.<anonymous> (/Users/joec/Development/rgabot-slack-botkit/node_modules/apiai/module/json_api_request.js:59:25) at IncomingMessage.emit (events.js:187:15) at IncomingMessage.EventEmitter.emit (domain.js:441:20) at endReadableNT (_stream_readable.js:1094:12) at process._tickCallback (internal/process/next_tick.js:63:19) statusCode: 500, responseBody: '<html>\r\n<head><title>500 Internal Server Error</title></head>\r\n<body bgcolor="white">\r\n<center><h1>500 Internal Server Error</h1></center>\r\n<hr><center>nginx/1.13.6</center>\r\n</body>\r\n</html>\r\n', name: 'ServerError', message: 'Wrong response status code.' }

joechoi-git commented 5 years ago

Found out the issue. POST /v1/query's "sessionId" is now checking for the string input.