Skip to content

Commit

Permalink
Изменение текста ошибки (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
grigoriev-semyon committed Apr 8, 2024
1 parent 174c4f4 commit 520398d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions userdata_api/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ def __init__(self, error_en: str, error_ru: str) -> None:
class ObjectNotFound(UserDataApiError):
def __init__(self, obj: type, obj_id_or_name: int | str):
super().__init__(
f"Object {obj.__name__} {obj_id_or_name=} not found",
f"Объект {obj.__name__} с идиентификатором {obj_id_or_name=} не найден",
f"Object {obj.__name__} {obj_id_or_name} not found",
f"Объект {obj.__name__} с идиентификатором {obj_id_or_name} не найден",
)


class AlreadyExists(UserDataApiError):
def __init__(self, obj: type, obj_id_or_name: int | str):
super().__init__(
f"Object {obj.__name__} {obj_id_or_name=} already exists",
f"Объект {obj.__name__} с идиентификатором {obj_id_or_name=} уже существует",
f"Object {obj.__name__} {obj_id_or_name} already exists",
f"Объект {obj.__name__} с идентфикатором {obj_id_or_name} уже существует",
)


Expand Down

0 comments on commit 520398d

Please sign in to comment.