microsoft / microsoft/BotFramework-DirectLineJS

Support for bot error HTTP status code

Open
#44 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

approved P0 triaged
Dominant language
TypeScript
Stars
199
Forks
133
PR merge metrics
No merged PRs in 30d

Description

Direct Line now returns an httpStatusCode field in the error JSON accompanying HTTP 502s caused by bot timeouts/errors. Is it possible to wire this up so clients have an easy time seeing the bot's HTTP status code?

Example below illustrates a bot returning HTTP 404.


HTTP/1.1 502
...

{
  "error": {
    "code": "ServiceError",
    "message": "Failed to send activity: bot returned an error"
  },
  "httpStatusCode": 404
}

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 locating the Direct Line error-response handling and checking how the JSON error payload is exposed to clients. Use the provided 502 response, including httpStatusCode 404, as the expected case; done means clients can access that bot HTTP status and coverage verifies it.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.