The thing I keep saying is: an error message is not a person telling you what specifically went wrong this time. It's a string somebody writing the program months or years ago thought would describe what they *guessed* back then might cause the code to reach that state unexpectedly.
1. Code can always be wrong, sometimes in ways the programmer hadn't thought of (in fact often since they probably handled the ways they'd thought of) and,
2. Error handling code is code.