# error: net/http: TLS handshake timeout

- **ID:** `go/net-http-tls-handshake-timeout`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The TLS handshake with the server did not complete within the configured timeout, often due to network latency or server overload.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.20 | active | — | — |
| 1.21 | active | — | — |

## Workarounds

1. **Set a reasonable TLS handshake timeout and use retry with backoff** (90% success)
   ```
   transport := &http.Transport{
    TLSHandshakeTimeout: 10 * time.Second,
}
client := &http.Client{Transport: transport}
// retry with exponential backoff
   ```

## Dead Ends

- **Increasing timeout indefinitely** — May mask underlying network issues; better to handle with retry logic. (50% fail)
