mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Return 404 if YouTube channel not found
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
ErrNotFound = errors.New("not found")
|
||||
ErrNotFound = errors.New("resource not found")
|
||||
)
|
||||
|
||||
type Provider string
|
||||
@@ -17,6 +17,7 @@ const (
|
||||
Vimeo = Provider("vimeo")
|
||||
)
|
||||
|
||||
|
||||
type LinkType string
|
||||
|
||||
const (
|
||||
|
@@ -47,7 +47,7 @@ func (yt *YouTubeBuilder) listChannels(linkType api.LinkType, id string) (*youtu
|
||||
}
|
||||
|
||||
if len(resp.Items) == 0 {
|
||||
return nil, errors.New("channel not found")
|
||||
return nil, api.ErrNotFound
|
||||
}
|
||||
|
||||
item := resp.Items[0]
|
||||
|
Reference in New Issue
Block a user