Throw the "Not a websocket request" exception synchronously.
- Added unit test.
- So we don't lose the stack.

#1440