1
0
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:
Dmitry Panov
2020-04-16 21:22:32 +01:00
committed by GitHub
parent e3aed440ae
commit 174557ee4f
2 changed files with 3 additions and 0 deletions

View File

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

View File

@ -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)
}