Skip to content

Commit

Permalink
remove unnecessary no rows error check
Browse files Browse the repository at this point in the history
  • Loading branch information
mynar7 committed Jul 16, 2024
1 parent 2c6e27e commit 2a92ce1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/storage/trb_request_feedback.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (s *Store) GetTRBRequestFeedbackByTRBRequestID(ctx context.Context, trbRequ
"trb_request_id": trbRequestID,
})

if err != nil && !errors.Is(err, sql.ErrNoRows) {
if err != nil {
appcontext.ZLogger(ctx).Error("Failed to fetch TRB request feedback by ID", zap.Error(err), zap.String("id", trbRequestID.String()))
return nil, &apperrors.QueryError{
Err: err,
Expand All @@ -138,7 +138,7 @@ func (s *Store) GetTRBRequestFeedbackByTRBRequestIDs(ctx context.Context, trbReq
"trb_request_ids": pq.Array(trbRequestIDs),
})

if err != nil && !errors.Is(err, sql.ErrNoRows) {
if err != nil {
appcontext.ZLogger(ctx).Error("Failed to fetch TRB request feedback by IDs", zap.Error(err))
return nil, &apperrors.QueryError{
Err: err,
Expand Down Expand Up @@ -184,7 +184,7 @@ func (s *Store) GetNewestTRBRequestFeedbackByTRBRequestIDs(ctx context.Context,
"trb_request_ids": pq.Array(trbRequestIDs),
})

if err != nil && !errors.Is(err, sql.ErrNoRows) {
if err != nil {
appcontext.ZLogger(ctx).Error(
"Failed to fetch latest TRB request feedback by IDs",
zap.Error(err),
Expand Down

0 comments on commit 2a92ce1

Please sign in to comment.