microsoft / microsoft/BotFramework-DirectLineJS
DirectlineStreaming: Errors on disconnect are written to console
Nobody has claimed this yet.
- 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
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.
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