fix: map ScrapingError to 502 Bad Gateway instead of 500 Internal Server Error; fix downr.org Cloudflare block; fix YouTube savetube DNS failure; fix twitter/pinterest error handling
This commit is contained in:
@@ -135,6 +135,10 @@ impl IntoResponse for AppError {
|
||||
|
||||
impl From<ScrapingError> for AppError {
|
||||
fn from(e: ScrapingError) -> Self {
|
||||
AppError::Internal(format!("{}", e))
|
||||
// Map ScrapingError::Http to BAD_GATEWAY (502) — the scraper code
|
||||
// correctly returns DownloadResult::error for client-side issues
|
||||
// (invalid URL, bad format), so any ScraperError that escapes is
|
||||
// an upstream provider failure, not a local bug.
|
||||
AppError::ScraperError(e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user