[BUG]: GitHubWebhookExtensions.GetBodyAsync
can throw a BadHttpRequestException
if the connection closes
#619
Labels
Status: Triage
This is being looked at and prioritized
Type: Bug
Something isn't working as documented
What happened?
I'm hosting an app on Azure Container App with scaling set to zero. Due to the absence of AOT, the startup times are sluggish.
Consequently, the webhook processing is delayed, and the 10-second timeout imposed by GitHub 1 sometimes expires before the body is fully read, especially if the app is scaled up by an influx of GitHub webhooks.
If GitHub closes the connection, while we're reading the HTTP body, a
BadHttpRequestException
gets thrown insideGitHubWebhookExtensions.GetBodyAsync
:Details
I'm not sure what the expected result should be, if it's fine to leave the exception unhandled, or if we should swallow it like we do for a
WebhookEventProcessor
:webhooks.net/src/Octokit.Webhooks.AspNetCore/GitHubWebhookExtensions.cs
Lines 57 to 69 in ab5732d
Versions
Octokit.Webhooks.AspNetCore 2.4.1
Relevant log output
No response
Code of Conduct
Footnotes
https://docs.github.com/en/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks#timed-out ↩
The text was updated successfully, but these errors were encountered: