If I visit https://docs.rs/crate/{name}/{version}/builds or https://docs.rs/crate/{name}/{version}/features with an invalid combination of name and version (i.e. a release that doesn't exist) I get an Internal server error. I only got there by manually typing in a version number for a crate that never existed.
An error page with The requested crate does not exist.
An error page with Internal Server Error
https://docs.rs/crate/serde/2.0.0/builds
The crate_details handler wraps most of its logic into a match_version call that early-returns Err(Nope::CrateNotFound) when no crate is found. That turns into an IronError and produces the expected error page while the rest of the handler can assume that there is an actual release to work with.
The features handler does not use such a wrapper and just fails on an assertion in /src/web/features.rs. This also has the effect that
https://docs.rs/crate/serde/1.0.118, https://docs.rs/crate/serde/latest and https://docs.rs/crate/serde/1.0.118/features work, but https://docs.rs/crate/serde/latest/features does not.
Sounds like you understand exactly what's breaking and why :) are you interested in writing up a fix? Like you said, it should be as simple as calling match_version on the version, that would account for semantic versioning too which currently doesn't happen.
@Xiphoseer are you currently tackling this? If not, I'd love to pick it up.
@Xiphoseer are you currently tackling this? If not, I'd love to pick it up.
No, I'm not.
PR filed! #1236