Search not working #4

Closed
opened 2026-05-29 18:29:20 -04:00 by maddox · 1 comment
Owner

See output below

@maddox:fails.me

Search failed: GET /api/v1/search → 400: {"message":"Parameter 'query' must be url encoded. Its value may not contain reserved characters.","errors":[{"path":".query.query","message":"Parameter 'query' must be url encoded. Its value may not

See output below @maddox:fails.me Search failed: GET /api/v1/search → 400: {"message":"Parameter 'query' must be url encoded. Its value may not contain reserved characters.","errors":[{"path":".query.query","message":"Parameter 'query' must be url encoded. Its value may not
Collaborator

Fixed in v0.6.3 (2be3d22) and deployed.

Root cause: SeerrClient._qs() was percent-encoding correctly, but aiohttp parses the URL string through yarl.URL(), which normalizes sub-delim chars like %27 back to literal ' in the query component. Seerr's ajv validator then rejects the literal reserved char with "Parameter 'query' must be url encoded."

Fix: wrap the pre-encoded URL in yarl.URL(url, encoded=True) so yarl skips re-normalization.

Verified live against deployed Seerr v3.2.0 with queries containing apostrophes, ampersands, commas, slashes, and ? — all 10 test queries return 200.

Fixed in v0.6.3 (2be3d22) and deployed. **Root cause:** `SeerrClient._qs()` was percent-encoding correctly, but aiohttp parses the URL string through `yarl.URL()`, which normalizes sub-delim chars like `%27` back to literal `'` in the query component. Seerr's ajv validator then rejects the literal reserved char with *"Parameter 'query' must be url encoded."* **Fix:** wrap the pre-encoded URL in `yarl.URL(url, encoded=True)` so yarl skips re-normalization. Verified live against deployed Seerr v3.2.0 with queries containing apostrophes, ampersands, commas, slashes, and `?` — all 10 test queries return 200.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maddox/maubot-media#4
No description provided.