# error: net/http: nil CookieJar

- **ID:** `go/net-http-cookie-jar-error`
- **Domain:** go
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The HTTP client's CookieJar is nil, causing panics when cookies are set or retrieved.

## Version Compatibility

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

## Workarounds

1. **Initialize a CookieJar for the client** (95% success)
   ```
   jar, _ := cookiejar.New(nil)
client := &http.Client{Jar: jar}
   ```

## Dead Ends

- **Ignoring cookie jar entirely** — May break cookie-based authentication; always initialize. (50% fail)
