change errors to match pymongo errors