This commit is contained in:
2022-03-16 01:47:36 +03:00
parent a8a02c6911
commit ff604e5a61
5 changed files with 128 additions and 2 deletions

22
gitflic/exceptions.py Normal file
View File

@@ -0,0 +1,22 @@
class GitflicExceptions(Exception):
error_code: int = 1
reason: str = None
reason_ru: str = None
class AuthError(GitflicExceptions):
error_code = 403
reason = None
reason_ru = None
class NoRights(GitflicExceptions):
error_code = 403
reason = "Нет прав для доступа."
reason_ru = "There are no access rights."
class NotFound(GitflicExceptions):
error_code = 404
reason = "No data was found for the query."
reason_ru = "Данные по запросу не найдены."