rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
2.95k stars 600 forks source link

Incorrect output with invalid routing query #9537

Open breathx opened 2 weeks ago

breathx commented 2 weeks ago

Current Behavior

If you go crates.io/users/$USERNAME?page=N, where N > $USERNAME.crates.len() / 10, than output will be empty page, rather then reroute to last page or returning an error.

Expected Behavior

Reroute/show last page/return error.

Steps To Reproduce

No response

Environment

Anything else?

No response

eth3lbert commented 2 weeks ago

I personally lean towards not planning to fix this. The reason is that it shouldn't happen if you're navigating via the frontend UI normally. Also, we plan to migrate to seek-based pagination at some point, which doesn't really have a page number.