# error: context canceled

- **ID:** `go/context-canceled-error`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A context was canceled (parent cancel, timeout, or client disconnect) while a downstream operation was in flight. The error surfaces from any context-aware call.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   if errors.Is(err, context.Canceled) {
    return nil // expected on shutdown
}
   ```
2. **** (88% success)
   ```
   if errors.Is(err, context.DeadlineExceeded) { retry() }
if errors.Is(err, context.Canceled) { return err }
   ```

## Dead Ends

- **** — Retrying with the same canceled context fails instantly in a tight loop; burns CPU and logs. (85% fail)
- **** — Removes timeout propagation; leaked requests and shutdown hangs. (80% fail)
