Search pagination crashes with "The provided value is in an invalid format" when navigating past page 400

(#4502) Bug Open: Confirmed Priority: P2 search ui

Reproduction steps

  1. Have a guild with a large message history (e.g. >10,000 messages).
  2. Run a broad search query (such as before: 2026-10-30).
  3. Scroll to the bottom of the search results to view the pagination controls.
  4. Click the last page button (e.g. 37357) or click the ellipsis (...) and enter any page number greater than 400 (e.g. 401).
  5. Submit the page jump.

Expected behaviour

Either search pagination should be clamped to page 400 with a notice/tooltip (like Discord's "We can only return up to 400 pages of results. Try making your search more specific!"), or the client should gracefully paginate beyond page 400. brave_n79RBIVfn0.png

Actual behaviour

The search results panel fails to load and displays: "Error" "The provided value is in an invalid format." "[Try again]" brave_z8RY44u3PW.png

Build information

Stable Web 2026.1030.144124, Windows NT 10.0 (x64), Chrome 156.0.0.0, Locale en-US

Platform

Web

2 comments

Sign in with Fluxer to comment and vote.
Comment by Fullest
FullestReviewer 1 vote
Status changed from Needs triage to Confirmed
CR: Canary Desktop 2026.1031.35431, Web 2026.1031.35431, Linux 7.2.11-200.fc44.x86_64 (x64), Electron 44.10.0, Chrome 152.0.7977.169, Node 24.22.1, Locale en-US
Comment by theinternetuser
Sort of related styling problem but I am not creating another issue because I think the intended way for pagination is to cap at 400, looking at packages/schema/src/domains/message/MessageRequestSchemas.ts. It looks fine on three digit page numbers.