microsoft / microsoft/BotFramework-DirectLineJS

DirectlineStreaming: Errors on disconnect are written to console

Open
#414 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bot Services bug customer-replied-to customer-reported
Dominant language
TypeScript
Stars
199
Forks
133
PR merge metrics
No merged PRs in 30d

Description

When disconnecting a connection that has pending requests, the infra botframework-streaming package rejects all the requests with "Disconnect was called" error.

It looks like the botframework-directlinejs package writes this error to the console instead/in addition to emitting an error event to the application.

This bypasses our logging system, and should not be done by libraries.

I suspect the console log comes from here or from here.

There are other calls to console.warn and console.error in the library. They should be replaced where possible with proper error propagation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/directLineStreaming.ts around lines 262 and 429, then inspect the linked nodeWebSocketClient.ts rejection behavior. Check the other console.warn and console.error calls in the library; done means disconnect errors and other applicable failures are propagated through the application error path rather than written directly to the console.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.