feat: add bounded observability and verified SLO incident alerts

This commit is contained in:
Vladislav Agapov
2026-10-29 18:01:11 +03:00
parent 470d9d6f1e
commit 6c7601802d
325 changed files with 24988 additions and 44 deletions
+23
View File
@@ -0,0 +1,23 @@
package production
import (
"errors"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/internal/service"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab6/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
}
}