Skip to content

Unhandled exception when receiving websocket error #170

@orgads

Description

@orgads

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)                                                            

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions