Handle at the open
The open is where the failure happens, so it is where the handling belongs. A wide catch turns a clear error into a mystery.
Decide missing on purpose
A missing input can mean empty, default, or fatal. Pick one and say it in the message, so the choice is visible.