Добавил балансировку и защиту от дублей

This commit is contained in:
Югай Артур Рустамович
2026-11-09 20:59:59 +03:00
parent 0ab3a341aa
commit 11820b5011
37 changed files with 2596 additions and 31 deletions
+14
View File
@@ -0,0 +1,14 @@
class ApiError(Exception):
def __init__(self, status, code, message):
super().__init__(message)
self.status = status
self.code = code
self.message = message
def invalid(message="Неверный запрос"):
return ApiError(400, "invalid_request", message)
def not_found():
return ApiError(404, "not_found", "Объект не найден")