microsoft / microsoft/BotFramework-DirectLineJS
Unhandled exception when receiving websocket error
Open
@compulim is already working on this.
Since Aug 11, 2020.
Bot Services
customer-replied-to
customer-reported
- Dominant language
- TypeScript
- Stars
- 199
- Forks
- 133
- PR merge metrics
- No merged PRs in 30d
Description
It happens occasionally when the websocket connection returns 400.
Can be easily reproduced by providing a non-working domain:
var directLine = new DirectLine({
secret: <bot-secret>,
domain: 'https://europe.directline.botframework.com/v3/directline'
});
Trace:
Error: Unexpected server response: 400
at ClientRequest.req.on (E:\Project\node_modules\ws\lib\websocket.js:559:5)
at ClientRequest.emit (events.js:159:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:550:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:115:23)
at TLSSocket.socketOnData (_http_client.js:439:20)
at TLSSocket.emit (events.js:159:13)
at addChunk (_stream_readable.js:265:12)
at readableAddChunk (_stream_readable.js:252:11)
at TLSSocket.Readable.push (_stream_readable.js:209:10)
at TLSWrap.onread (net.js:608:20)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.