feat: add private S3 attachments and safe reconciliation

This commit is contained in:
Vladislav Agapov
2026-10-29 16:27:20 +03:00
parent ec540a1a72
commit aca4c4eea9
217 changed files with 15042 additions and 44 deletions
+23
View File
@@ -0,0 +1,23 @@
package production
import (
"errors"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab4/internal/service"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab4/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
}
}