Error propagation passes an unresolved error to an upper program layer, adding context so that layer can decide how to handle it. Go commonly represents success or failure through a function's final error return value: callers check `if err != nil` immediately. section 5.1.3
Apply the technique at each call boundary:
- Handle the error locally when the current layer can resolve it. section 5.1.3
- Otherwise wrap it with `fmt.Errorf` and `%w`, preserving the underlying error while adding context. section 5.1.3
Propagating a validation error
`validateGuess` returns `errInvalidWordLength` wrapped with expected and actual lengths. The `ask` method receives that error and prints its message instead of accepting the guess; tests use `errors.Is` to verify the underlying error.



