use thiserror::Error;
#[derive(Error, Debug)]
pub enum YoutubeTranscriptError {
#[error("YouTube is receiving too many requests from this IP and now requires solving a captcha to continue")]
TooManyRequests,
#[error("The video is no longer available ({0})")]
VideoUnavailable(String),
#[error("Transcript is disabled on this video ({0})")]
TranscriptDisabled(String),
#[error("No transcripts are available for this video ({0})")]
TranscriptNotAvailable(String),
#[error(
"No transcripts are available in {0} for this video ({2}). Available languages: {1:?}"
)]
TranscriptNotAvailableLanguage(String, Vec<String>, String),
#[error("Impossible to retrieve Youtube video ID.")]
InvalidVideoId,
}