diff --git a/helpers/alice.py b/helpers/alice.py index 67ecc38..433f690 100644 --- a/helpers/alice.py +++ b/helpers/alice.py @@ -45,7 +45,7 @@ class Processor: hse_id = self.message.replace(' ', '') try: user = mongo.users_collection.find_one({"hse_id": int(hse_id)}) - except KeyError: + except ValueError: return { "text": "Извини, не могу разобрать код, назови его еще раз" }