Skip to content

How does one display URL in ureq::Error 3.0 Output? #988

Answered by algesten
theory asked this question in Q&A
Discussion options

You must be logged in to vote

There isn't any such option, and introducing one would be a semver breaking change.

It's a post-rationalization since it was a rather late insight in the 3.x development, but URLs can contain sensitive data, so on balance it might good to not leak them unnecessarily.

In your case I'd suggest you turn this error off using http_status_as_error(false)
. And then check the error code manually on the Response.

The logic ureq uses for triggering the error is very simple:
https://github.com/algesten/ureq/blob/main/src/run.rs#L102-L103

Replies: 1 comment 1 reply

Comment options

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

Answer selected by theory
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