Specifying what error is raised when expected key is not found