title: AWS API Gateway WebSocket Connection Error
body: <p>I created an API by AWS API Gateway and Lambda that is same '<a href="https://github.com/aws-samples/simple-websockets-chat-app" rel="nofollow noreferrer">https://github.com/aws-samples/simple-websockets-chat-app</a>'. But the API not working trust. I get an error when i try to connect. Its message is "WebSocket connection to 'wss://b91xftxta9.execute-api.eu-west-1.amazonaws.com/dev' failed: Error during WebSocket handshake: Unexpected response code: 500"</p>
  
  <p>My Connection 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>var ws= new WebSocket("wss://b91xftxta9.execute-api.eu-west-1.amazonaws.com/dev");
  ws.onopen=function(d){
   console.log(d);
  }</code></pre>
  </div>
  </div>
  </p>