From 8cbcd049c440d98a9eb2ecaca981f4e3911147ac Mon Sep 17 00:00:00 2001 From: Nathaniel Caza Date: Mon, 9 Sep 2024 11:24:14 -0500 Subject: [PATCH] Improve error handling for validation in GraphQL --- notification/store.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notification/store.go b/notification/store.go index 593cce8f24..3f1691326c 100644 --- a/notification/store.go +++ b/notification/store.go @@ -407,6 +407,9 @@ func (s *Store) LastMessageStatus(ctx context.Context, typ gadb.EnumOutgoingMess ContactMethodID: uuid.NullUUID{UUID: cmID, Valid: true}, CreatedAt: from, }) + if errors.Is(err, sql.ErrNoRows) { + return nil, time.Time{}, nil + } if err != nil { return nil, time.Time{}, err }