Skip to content

Too Vague: Reqwest Error error sending request for url (some url) #2342

Answered by seanmonstar
evbo asked this question in Q&A
Discussion options

You must be logged in to vote

thiserror is fine. A basic reporter could do something like this (might have a syntax error):

fn report(mut err: &dyn (std::error::Error + 'static)) -> String {
    let mut s = format!("{}", err);
    while let Some(src) = err.source() {
        let _ = write!(s, "\n\nCaused by: {}", src);
        err = src;
    }
    s
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@evbo
Comment options

@seanmonstar
Comment options

Answer selected by evbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants