fix: handle playlist not found

This commit is contained in:
ThetaDev 2022-10-11 19:50:43 +02:00
parent de9e3c6ed9
commit 79b7fcf92c
5 changed files with 49 additions and 23 deletions

View file

@ -533,16 +533,7 @@ fn map_channel_content(
Ok(MapResult::ok(content))
}
None => match alerts {
Some(alerts) => Err(ExtractionError::ContentUnavailable(
alerts
.into_iter()
.map(|a| a.alert_renderer.text)
.collect::<Vec<_>>()
.join(" "),
)),
None => Err(ExtractionError::InvalidData("no contents".into())),
},
None => Err(response::alerts_to_err(alerts)),
}
}