mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Log a message when a '429 Too Many Requests' error is detected, in case of another error log the output from youtube-dl. (#121)
Co-authored-by: Dmitry Panov <dop251@gmail.com>
This commit is contained in:
@ -186,6 +186,7 @@ func (u *Updater) downloadEpisodes(ctx context.Context, feedConfig *config.Feed)
|
||||
// We still need to generate XML, so just stop sending download requests and
|
||||
// retry next time
|
||||
if err == ytdl.ErrTooManyRequests {
|
||||
logger.Warn("server responded with a 'Too Many Requests' error")
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,8 @@ func (dl YoutubeDl) Download(ctx context.Context, feedConfig *config.Feed, episo
|
||||
return nil, ErrTooManyRequests
|
||||
}
|
||||
|
||||
log.Error(output)
|
||||
|
||||
return nil, errors.New(output)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user