Update error type for pgx package
This commit is contained in:
parent
b3559bb94e
commit
0d2fcfc9ff
|
@ -18,6 +18,7 @@ import (
|
|||
signerv4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v4"
|
||||
youtubev2 "github.com/kkdai/youtube/v2"
|
||||
"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) {
|
||||
mediaSet, err := s.store.GetMediaSetByYoutubeID(ctx, youtubeID)
|
||||
if err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
if err == pgx.ErrNoRows {
|
||||
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{
|
||||
|
|
Loading…
Reference in New Issue