Skip to content

Getting error source #378

Answered by sagebind
troelsarvin asked this question in Questions
Feb 27, 2022 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

The source of an isahc::error::Error is an underlying error (implementing std::error::Error) emitted at a lower level that may have caused the higher-level Isahc error to be returned. We don't guarantee that the source is present, and if it is present, we don't guarantee that it will be of a particular type, since that would make it difficult for us to change the implementation details of Isahc. Keep this in mind when trying to introspect errors.

If you just want to know what kind of error it is, then I recommend using the isahc::error::Error::kind method, which returns potentially one of the enum variants in ErrorKind that broadly classify what failed. For example, if you just want to kn…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@troelsarvin
Comment options

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