SendError
type SendError = fastly.SendErrorDetailAlias for fastly.SendErrorDetail.
SendError provides detailed information about backend request failures.
Use errors.As() to extract the SendError from the error chain, then use the Cause() method to determine the specific error cause.
Example usage:
12345678910111213141516resp, err := req.Send(ctx, "backend")if err != nil { var se fsthttp.SendError if errors.As(err, &se) { switch se.Cause() { case fsthttp.SendErrorConnectionTimeout: log.Println("connection timed out")
case fsthttp.SendErrorDNSError: log.Printf("DNS lookup failed: rcode=%d, info=%d", se.DNSErrorRCode(), se.DNSErrorInfoCode())
case fsthttp.SendErrorTLSAlertReceived: log.Printf("TLS alert: %d (%s)", se.TLSAlertID(), se.TLSAlertDescription()) } }}