Throw Exception in indexing API