Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Watson助手消息方法抛出错误_Node.js_Watson Assistant - Fatal编程技术网

Node.js Watson助手消息方法抛出错误

Node.js Watson助手消息方法抛出错误,node.js,watson-assistant,Node.js,Watson Assistant,从我的NodeJScode调用Watson助手message方法时,我得到以下错误 { Error: Response not received. Body of error is HTTP ClientRequest object at RequestWrapper.formatError (D:\avamar\avamar\Official\IBM Watson\Code\Coversation Simple example\node_modules\ibm-watson\node_

从我的
NodeJS
code调用Watson助手
message
方法时,我得到以下错误

{ Error: Response not received. Body of error is HTTP ClientRequest object
    at RequestWrapper.formatError (D:\avamar\avamar\Official\IBM Watson\Code\Coversation Simple example\node_modules\ibm-watson\node_modules\ibm-cloud-sdk-core\lib\requestwrapper.js:219:21)
    at D:\avamar\avamar\Official\IBM Watson\Code\Coversation Simple example\node_modules\ibm-watson\node_modules\ibm-cloud-sdk-core\lib\requestwrapper.js:207:29
    at process._tickCallback (internal/process/next_tick.js:68:7)   message:    'Response not received. Body of error is HTTP ClientRequest object',   body:    Writable {
     _writableState:
      WritableState {
        objectMode: false,
        highWaterMark: 16384,
        finalCalled: false,
        needDrain: false,
        ending: false,
        ended: false,
        finished: false,
        destroyed: false,
        decodeStrings: true,
        defaultEncoding: 'utf8',
        length: 0,
        writing: false,
        corked: 0,
        sync: true,
        bufferProcessing: false,
        onwrite: [Function: bound onwrite],
        writecb: null,
        writelen: 0,
        bufferedRequest: null,
        lastBufferedRequest: null,
        pendingcb: 0,
        prefinished: false,
        errorEmitted: false,
        emitClose: true,
        bufferedRequestCount: 0,
        corkedRequestsFree: [Object] },
     writable: true,
     _events:
      [Object: null prototype] {
        response: [Function: handleResponse],
        error: [Function: handleRequestError] },
     _eventsCount: 2,
     _maxListeners: undefined,
     _options:
      { protocol: 'https:',
        maxRedirects: 21,
        maxBodyLength: Infinity,
        path: '/identity/token',
        method: 'post',
        headers: [Object],
        agent: [Agent],
        auth: undefined,
        hostname: 'iam.cloud.ibm.com',
        port: null,
        nativeProtocols: [Object],
        pathname: '/identity/token' },
     _redirectCount: 0,
     _redirects: [],
     _requestBodyLength: 135,
     _requestBodyBuffers: [ [Object] ],
     _onNativeResponse: [Function],
     _currentRequest:
      ClientRequest {
        _events: [Object],
        _eventsCount: 6,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: true,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: null,
        _hasBody: true,
        _trailer: '',
        finished: false,
        _headerSent: true,
        socket: [TLSSocket],
        connection: [TLSSocket],
        _header:
         'POST /identity/token HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: Basic Yng6Yng=\r\nUser-Agent: axios/0.18.1\r\nContent-Length: 135\r\nHost: iam.cloud.ibm.com\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Agent],
        socketPath: undefined,
        timeout: undefined,
        method: 'POST',
        path: '/identity/token',
        _ended: false,
        res: null,
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        _redirectable: [Circular],
        [Symbol(isCorked)]: false,
        [Symbol(outHeadersKey)]: [Object] },
     _currentUrl: 'https://iam.cloud.ibm.com/identity/token' } }

你能更具体地问一下你在问什么吗?否则很难帮助你。另外,请更详细地描述错误的上下文。我创建了一个watson assistant服务。我在NodeJS中编写了一段代码,并调用了服务API的消息方法。这是服务返回上述错误的时候。您能更具体地说明您的问题吗?否则很难帮助你。另外,请更详细地描述错误的上下文。我创建了一个watson assistant服务。我在NodeJS中编写了一段代码,并调用了服务API的消息方法。此时服务返回上述错误。