Fixes exception name

Fixes a wrong exception name which made it impossible to skip mongo tests in case of error.