Good error context includes:
The operation being performed: "loading config", "connecting to database"
Relevant identifiers: filenames, URLs, IDs
Not redundant information the caller already knows.
Build context as errors propagate up. The final error message tells the full story.