title: Lex: The server encountered an error processing lambda
body: <p>I'm developing a chatbot on AWS Lex and I want to use Lambda function to branch my intent.
  In order to do so, I created a Lambda as follows:</p>
  <pre><code>exports.handler = async (event) =&gt; {
      
      console.log(event); //capture Lex params
  /*    
      let { name, slots } = event.currentIntent
      
      if(slots.MeetingType.toLowerCase() === 'on-line') {
          
          return  {
              dialogAction: {
                  type: &quot;ElicitSlot&quot;,
                  intentName: name,
                  slotToElicit: &quot;InvitationLink&quot;,
                  slots
              }
          }
      }
      
      return {
          dialogAction: {
              type: &quot;Delegate&quot;,
              slots
          }
      }
  */    
  };
  </code></pre>
  <p>But as you can see, even when the function does nothing but log Lex output, I'm getting this error message in Lex:</p>
  <blockquote>
  <p>An error has occurred: The server encountered an error processing the
  Lambda response</p>
  </blockquote>
  <p>Any help would be appreciated.</p>