feat: add more extraction errors

This commit is contained in:
ThetaDev 2022-11-04 21:28:13 +01:00
parent f748b98ccc
commit 68342cecab
4 changed files with 78 additions and 25 deletions

View file

@ -1075,11 +1075,8 @@ impl RustyPipeQuery {
Ok(mapres.c)
}
Err(e) => {
match e {
ExtractionError::VideoUnavailable(_, _)
| ExtractionError::VideoAgeRestricted
| ExtractionError::ContentUnavailable(_) => (),
_ => create_report(Level::ERR, Some(e.to_string()), Vec::new()),
if e.should_report() {
create_report(Level::ERR, Some(e.to_string()), Vec::new());
}
Err(e.into())
}