From a10f37371a2a91a590e211f8b93761054d6b672a Mon Sep 17 00:00:00 2001 From: Siddhartha Basu Date: Fri, 16 Aug 2024 10:32:06 -0500 Subject: [PATCH] fix(service.go): handle generic errors in ListContents function Adds error handling for generic errors in the ListContents function of the ContentService. This ensures that all types of errors are appropriately managed and responded to, improving the robustness and reliability of the error handling mechanism in the service layer. --- internal/app/service/service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/app/service/service.go b/internal/app/service/service.go index 9d614b9..45c33b7 100644 --- a/internal/app/service/service.go +++ b/internal/app/service/service.go @@ -200,6 +200,7 @@ func (srv *ContentService) ListContents( if repository.IsContentListNotFound(err) { return nil, aphgrpc.HandleNotFoundError(ctx, err) } + return nil, aphgrpc.HandleGetError(ctx, err) } cntDataSlice := make([]*content.ContentCollection_Data, 0) for _, cntD := range cntModel {