Catch throw errors due to illegal collection name