lab2: fix review — cache consistency, readiness, timeouts, uuid validation, tuple index
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-10 01:14:56 +03:00
parent a327909856
commit 40f260612f
21 changed files with 185 additions and 189 deletions
+4
View File
@@ -91,6 +91,8 @@ func mapError(err error) (int, string) {
return http.StatusNotFound, "not_found"
case errors.Is(err, service.ErrConflict):
return http.StatusConflict, "conflict"
case errors.Is(err, service.ErrUnavailable):
return http.StatusServiceUnavailable, "unavailable"
default:
return http.StatusInternalServerError, "internal_error"
}
@@ -108,6 +110,8 @@ func messageFor(code string) string {
return "Конфликт"
case "internal_error":
return "Внутренняя ошибка"
case "unavailable":
return "Сервис недоступен"
default:
return "Ошибка"
}