The other case where elasticsearch will return a 404 is when you want to access a document directly but it doesn't exist. That cannot happen with our code, so I think we are safe assuming that line won't fail (unless elasticsearch changes its behaviour, of course).