Skip to content

fix(twilio): answer Twilio's status callbacks with 204 instead of an empty 200 - #1501

Merged
yileicn merged 1 commit into
SciSharp:masterfrom
yuyixg:fix/twilio-callbacks-no-content
Nov 18, 2026
Merged

yileicn merged 1 commit into
SciSharp:masterfrom
yuyixg:fix/twilio-callbacks-no-content

Conversation

@yuyixg

@yuyixg yuyixg commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Why

Twilio's debugger logs warning 15003 ("Got HTTP 502 response to https://.../twilio/voice/status") on every call. Our endpoint ran fine and answered 200 in 20 ms. Twilio's own record of the request shows why it counted it as a failure:

  • x-twilio-reason: Empty/Invalid Response from Remote Host
  • body: "Error reading response: Response does not contain content type"

Ok() answers a 200 with no body and no content type. Twilio wants either 204 with no body, or TwiML.

What changed

The call status (twilio/voice/status), recording status (twilio/record/status) and transcription (twilio/transcribe) callbacks now return NoContent(). Nothing else changes: these callbacks aren't retried, and their answer carries nothing.

Tests

  • BotSharp.Plugin.Twilio builds.
  • To check after deploying: Twilio's debugger stops logging 15003 for these callbacks.

🤖 Generated with Claude Code

…empty 200

The call status, recording status and transcription callbacks answered with Ok(): a 200 with no body and no content
type. Twilio reads that as a failed callback ("Error reading response: Response does not contain content type") and logs
warning 15003, "Got HTTP 502 response to .../twilio/voice/status", on every call, though the endpoint ran fine. It wants
204 with no body, or TwiML. Nothing else changes: the callbacks aren't retried and their answer carries nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@yileicn

yileicn commented Nov 18, 2026

Copy link
Copy Markdown
Member

reviewed

@yileicn
yileicn merged commit 4800871 into SciSharp:master Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants