title: WsException in WebSocketGateway not working
body: <p>I'm playing with NestJs and stuck with one problem. I just can`t throw an exception in WebSocket gateway.</p>
  
  <p>Everything is according to <a href="https://docs.nestjs.com/websockets/exception-filters" rel="nofollow noreferrer">this doc page</a>.</p>
  
  <p>I have tried to include</p>
  
  <pre><code>@UseFilters(new BaseWsExceptionFilter())
  </code></pre>
  
  <p>But... didn`t help.</p>
  
  <pre class="lang-js prettyprint-override"><code>import {
      SubscribeMessage,
      WebSocketGateway,
      WebSocketServer, WsException,
  } from '@nestjs/websockets';
  import { Client, Server } from 'socket.io';
  
  @WebSocketGateway()
  export class EventsGateway {
      @WebSocketServer()
      server: Server;
  
      @SubscribeMessage('exception')
      exception(client: Client, data: number) {
          throw new WsException('Invalid credentials.');
      }
  }
  
  </code></pre>
  
  <p>And I had smt like this...</p>
  
  <pre><code>/home/innistry/Projects/nest-likbez/node_modules/rxjs/internal/util/hostReportError.js:4
  [0]     setTimeout(function () { throw err; }, 0);
  [0]                              ^
  [0] 
  [0] TypeError: host.setType is not a function
  [0]     at WsProxy.handleError (/home/innistry/Projects/nest-likbez/node_modules/@nestjs/websockets/context/ws-proxy.js:26:14)
  [0]     at EventsGateway.&lt;anonymous&gt; (/home/innistry/Projects/nest-likbez/node_modules/@nestjs/websockets/context/ws-proxy.js:20:22)
  [0]     at process._tickCallback (internal/process/next_tick.js:68:7)
  </code></pre>