title: Actions Sdk get this error TypeError: Cannot read property 'output' of undefined
body: <p>I'm trying to connect IBM Watson and Google Assistant, but I keep receiving this error "TypeError: Cannot read property 'output' of undefined" and this "Function execution took 3323 ms, finished with status: 'crash'"</p>
  
  <p>This is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const {actionssdk} = require('actions-on-google');
  const functions = require('firebase-functions');
  
  const app = actionssdk({debug: true});
  
  app.intent('actions.intent.MAIN', (conv) =&gt; {
      conv.ask('Olá, como posso lhe ajudar?');
  });
  
  
  app.intent('actions.intent.TEXT', (conv, input) =&gt; {
      var AssistantV1 = require('watson-developer-cloud/assistant/v1');
      var assistant = new AssistantV1({
          username: '###################################',
          password: '###################################',
          url: '###################################',
          version: '2018-07-10'
      });
      conv.ask("eeeeeeeeeeeeeeeee");
      return new Promise( (resolve, reject) =&gt; {
          assistant.message(
          {
            workspace_id: '###################################',
              input: { text: input },
              headers: {'Content-Type':'application/json'}
          },
          function(err, response) {
              conv.ask(response.output.text[0]);
              resolve();
          }
          );
       })
  });
  exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);</code></pre>
  </div>
  </div>
  </p>