SERVER-14205: fix error reporting in IndexCatalog::createIndex

(cherry picked from commit 8fc8bc9a86711bb9ea41887d2f88362353dc3062)