Request building error handler
This commit is contained in:
parent
fb7faf6477
commit
07363e47a9
@ -64,7 +64,11 @@ fn request(url: String) -> Boxed<Result<Response<Body>, String>> {
|
|||||||
.header("Accept-Language", "en-US,en;q=0.5")
|
.header("Accept-Language", "en-US,en;q=0.5")
|
||||||
.header("Connection", "keep-alive")
|
.header("Connection", "keep-alive")
|
||||||
.body(Body::empty())
|
.body(Body::empty())
|
||||||
.expect("request builder")
|
.map_err(|e| {
|
||||||
|
println!("Error building request to send to Reddit: {} - URL: {}", e.to_string(), uri);
|
||||||
|
e
|
||||||
|
})
|
||||||
|
.unwrap_or_default()
|
||||||
};
|
};
|
||||||
|
|
||||||
async move {
|
async move {
|
||||||
|
Loading…
Reference in New Issue
Block a user