Skip to content

Commit

Permalink
fix(service.go): handle generic errors in ListContents function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cybersiddhu committed Aug 16, 2024
1 parent e14b21f commit af022e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/app/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit af022e0

Please sign in to comment.