TUN-6427: Differentiate between upstream request closed/canceled and failed origin requests

This commit is contained in:
Devin Carr 2022-06-17 14:39:38 -07:00
parent 6a6ba704f1
commit f4667c6345
1 changed files with 3 additions and 0 deletions

View File

@ -196,6 +196,9 @@ func (p *Proxy) proxyHTTPRequest(
resp, err := httpService.RoundTrip(roundTripReq) resp, err := httpService.RoundTrip(roundTripReq)
if err != nil { if err != nil {
tracing.EndWithErrorStatus(ttfbSpan, err) tracing.EndWithErrorStatus(ttfbSpan, err)
if err := roundTripReq.Context().Err(); err != nil {
return errors.Wrap(err, "Incoming request ended abruptly")
}
return errors.Wrap(err, "Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared") return errors.Wrap(err, "Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared")
} }