dialogflow / dialogflow-nodejs-client

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

ServerError : Wrong response status code #72

Open rippertnt opened 7 years ago

rippertnt commented 7 years ago

I had tried to run "voice_request.js" example, but error has occurred like this.

ServerError : Wrong response status Code, statuesCode 502 The server encountered a temporary error and could not complete yout request Please try again in 30 seconds.

It seems that apiai server's speech recognition function isn't working now. How could I solve this situation?

simlated commented 7 years ago

Same here both for the example and our production code.

Is apiai.ai still supporting voice requests, I could not find any reference to it in API Reference

{ ServerError: Wrong response status code.
   [...]
  statusCode: 502,
  responseBody: '\n<html><head>\n<meta http-equiv="content-type" content="text/html;charset=utf-8">\n<title>502 Server Error</title>\n</head>\n<body text=#000000 bgcolor=#ffffff>\n<h1>Error: Server Error</h1>\n<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>\n<h2></h2>\n</body></html>\n',
  name: 'ServerError',
  message: 'Wrong response status code.' }
{ Error: write EPIPE
    at exports._errnoException (util.js:1018:11)
    at WriteWrap.afterWrite (net.js:800:14) code: 'EPIPE', errno: 'EPIPE', syscall: 'write' }
simlated commented 7 years ago

Well @rippertnt , bad news, see here: https://github.com/api-ai/apiai-nodejs-client/issues/35. Speech recognition has been deprecated as apiai is focusing on NLP. So we need to use some 3rd patry service. IMO the voice request should be removed from this library.