rust-lang/docs.rs

Broken link "examples" in docs for crate clap

Closed this issue ยท 5 comments

Hey ๐Ÿ‘‹ I think I see #27 again (this time with as HTTP/400)

$ curl -I https://docs.rs/crate/clap/examples
HTTP/2 400

Error on the webpage is:

Cannot parse `version` with value `examples`: unexpected character 'e' while parsing major version number"

thanks

ah yeah, right, thanks for the report!

I think it came back with the migration to axum, and me using an extractor to parse the version, not a part of the handler any more.

looking at my old PR, this was an intentional choice to go from 404 to 400:
#2383

@apiraino could you elaborate what you expect here? what page would you want to see?

hey thanks for pointing me to #2383

So, let's try to see this from my perspective: I know nothing about docs.rs (except that is cool <3) and am looking at the documentation of the clap crate). Clicking on "examples" ...

screenshot

Image

... I get a "Bad Error" with a message I fail to understand. At face value this looks like something went wrong server-side. I get the same error with anything else:
https://docs.rs/crate/clap/LICENSE-APACHE
https://docs.rs/crate/clap/LICENSE-MIT
https://docs.rs/crate/clap/LOL

Looking at #2383 I'm not sure what is meant by "This changes the status code for an invalid version identifier". Is this error caused by wrong links built in the crate documentation? Should they have a version number?

My expectation is to understand what's the problem here and report it to the right place :-)

thanks

ah, that's something else I think.

The text part on the "crate info page" (as we call it) is rendered from the readme-file of the crate: https://github.com/clap-rs/clap/blob/master/README.md

The /examples/ link in that readme is a relative link that assumes the readme file is rendered on github.

So this IMO is more a bug in the readme of clap :)