From 8f9be99c4169b878dfdf57272dff9379810bb227 Mon Sep 17 00:00:00 2001 From: Luna Seemann Date: Wed, 28 Jan 2026 09:26:28 +0100 Subject: [PATCH] feat: skip blobs with empty or invalid CIDs (#61) Instead of returning an error when encountering an empty or invalid CID, log the error and continue processing the remaining blobs. --- server/handle_sync_list_blobs.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/handle_sync_list_blobs.go b/server/handle_sync_list_blobs.go index 3855fbb..48208d1 100644 --- a/server/handle_sync_list_blobs.go +++ b/server/handle_sync_list_blobs.go @@ -59,10 +59,14 @@ func (s *Server) handleSyncListBlobs(e echo.Context) error { var cstrs []string for _, b := range blobs { + if len(b.Cid) == 0 { + logger.Error("empty cid found", "blob", b) + continue + } c, err := cid.Cast(b.Cid) if err != nil { logger.Error("error casting cid", "error", err) - return helpers.ServerError(e, nil) + continue } cstrs = append(cstrs, c.String()) } -- 2.51.2