diff --git a/pkg/appview/storage/manifest_store.go b/pkg/appview/storage/manifest_store.go index 44ec3d2..499ad62 100644 --- a/pkg/appview/storage/manifest_store.go +++ b/pkg/appview/storage/manifest_store.go @@ -192,6 +192,11 @@ func (s *ManifestStore) Put(ctx context.Context, manifest distribution.Manifest, // Do this asynchronously to avoid blocking the push if tag != "" && s.ctx.ServiceToken != "" && s.ctx.Handle != "" { go func() { + defer func() { + if r := recover(); r != nil { + slog.Error("Panic in notifyHoldAboutManifest", "panic", r) + } + }() if err := s.notifyHoldAboutManifest(context.Background(), manifestRecord, tag, dgst.String()); err != nil { slog.Warn("Failed to notify hold about manifest", "error", err) } @@ -201,6 +206,11 @@ func (s *ManifestStore) Put(ctx context.Context, manifest distribution.Manifest, // Refresh README cache asynchronously if manifest has io.atcr.readme annotation // This ensures fresh README content is available on repository pages go func() { + defer func() { + if r := recover(); r != nil { + slog.Error("Panic in refreshReadmeCache", "panic", r) + } + }() s.refreshReadmeCache(context.Background(), manifestRecord) }()