Implement lab 2 with PostgreSQL, Valkey admission and Helm deployment
Application / verify (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Vladislav Agapov
2026-10-15 17:09:26 +03:00
parent 65003b6119
commit b90581f613
184 changed files with 15853 additions and 56 deletions
+23
View File
@@ -0,0 +1,23 @@
package production
import (
"errors"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab2/internal/service"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab2/internal/store"
)
// normalizeStoreError maps expected storage failures to application errors.
// Unexpected failures retain their cause for the transport's safe fallback.
func normalizeStoreError(err error) error {
switch {
case errors.Is(err, store.ErrNotFound):
return service.ErrNotFound
case errors.Is(err, store.ErrConflict):
return service.ErrConflict
case errors.Is(err, store.ErrCapacity):
return service.ErrCapacity
default:
return err
}
}