Update error type for pgx package

This commit is contained in:
Rob Watson 2021-11-25 20:35:51 +01:00
parent b3559bb94e
commit 0d2fcfc9ff
1 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import (
signerv4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" signerv4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/jackc/pgx/v4"
youtubev2 "github.com/kkdai/youtube/v2" youtubev2 "github.com/kkdai/youtube/v2"
"go.uber.org/zap" "go.uber.org/zap"
) )
@ -189,10 +190,10 @@ func (s *MediaSetService) createMediaSet(ctx context.Context, youtubeID string)
func (s *MediaSetService) findMediaSet(ctx context.Context, youtubeID string) (*MediaSet, error) { func (s *MediaSetService) findMediaSet(ctx context.Context, youtubeID string) (*MediaSet, error) {
mediaSet, err := s.store.GetMediaSetByYoutubeID(ctx, youtubeID) mediaSet, err := s.store.GetMediaSetByYoutubeID(ctx, youtubeID)
if err != nil { if err != nil {
if err == sql.ErrNoRows { if err == pgx.ErrNoRows {
return nil, nil return nil, nil
} }
return nil, fmt.Errorf("error getting existing media set: %v", err) return nil, fmt.Errorf("error getting media set: %v", err)
} }
return &MediaSet{ return &MediaSet{