Skip to content

Commit

Permalink
chore(page): add new_page_streaming error
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Jan 7, 2025
1 parent d450c18 commit de1e779
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spider/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider"
version = "2.24.9"
version = "2.24.10"
authors = [
"j-mendez <jeff@spider.cloud>"
]
Expand Down
6 changes: 4 additions & 2 deletions spider/src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ fn get_error_status_base(should_retry: &mut bool, error_for_status: Option<Resul

#[cfg(not(feature = "page_error_status_details"))]
/// Get the error status of the page.
fn get_error_status(should_retry: &mut bool, error_for_status: Option<Result<reqwest::Response, reqwest::Error>>) -> Option<String> {
fn get_error_status(should_retry: &mut bool, error_for_status: Option<Result<reqwest::Response, reqwest::Error>>) -> Option<String> {
get_error_status_base(should_retry, error_for_status).map(|e| e.to_string())
}

Expand Down Expand Up @@ -857,12 +857,14 @@ impl Page {
response.0
}
Ok(res) => setup_default_response(url, &res),
Err(_) => {
Err(err) => {
log::info!("error fetching {}", url);
let mut page_response = PageResponse::default();
if let Ok(status_code) = StatusCode::from_u16(599) {
page_response.status_code = status_code;
}
page_response.error_for_status = Some(Err(err));

page_response
}
};
Expand Down
2 changes: 1 addition & 1 deletion spider_chrome/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider_chrome"
version = "2.24.9"
version = "2.24.10"
rust-version = "1.70"
authors = [
"j-mendez <jeff@spider.cloud>"
Expand Down
2 changes: 1 addition & 1 deletion spider_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider_cli"
version = "2.24.9"
version = "2.24.10"
authors = [
"j-mendez <jeff@spider.cloud>"
]
Expand Down
2 changes: 1 addition & 1 deletion spider_transformations/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider_transformations"
version = "2.24.9"
version = "2.24.10"
authors = [
"j-mendez <jeff@spider.cloud>"
]
Expand Down
2 changes: 1 addition & 1 deletion spider_utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider_utils"
version = "2.24.9"
version = "2.24.10"
authors = [
"j-mendez <jeff@spider.cloud>"
]
Expand Down
2 changes: 1 addition & 1 deletion spider_worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "spider_worker"
version = "2.24.9"
version = "2.24.10"
authors = [
"j-mendez <jeff@spider.cloud>"
]
Expand Down

0 comments on commit de1e779

Please sign in to comment.