From 8911ead778e264ae4df8f33cdaaa4b922708f381 Mon Sep 17 00:00:00 2001 From: Jaz Volpert Date: Fri, 22 Sep 2023 21:07:42 +0000 Subject: [PATCH] Don't try to index posts with invalid timestamps, an empty timestamp violates our ES schema --- search/indexing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search/indexing.go b/search/indexing.go index cc54f0373..5b0bfb512 100644 --- a/search/indexing.go +++ b/search/indexing.go @@ -59,7 +59,7 @@ func (s *Server) indexPost(ctx context.Context, ident *identity.Identity, rec *a _, err := util.ParseTimestamp(rec.CreatedAt) if err != nil { log.Warn("post had invalid timestamp", "createdAt", rec.CreatedAt, "parseErr", err) - rec.CreatedAt = "" + return fmt.Errorf("post had invalid timestamp: %w", err) } doc := TransformPost(rec, ident, rkey, rcid.String())