1
0
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:
Maksym Pavlenko
2017-08-22 23:31:53 -07:00
parent 9f87308927
commit da4a6ffe19
2 changed files with 3 additions and 2 deletions

View File

@@ -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 (

View File

@@ -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]