With #6475 we introduced the use of a new IndexClosedException that gets thrown whenever we refer to closed indices within apis that don't allow them (behaviour can also be changed through indices options in some cases). We should streamline the use of this exception and use it within single index apis like index api, which currently return an index block during the execution while we could throw the newly added IndexClosedException instead.