-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Description
When a user enters only one character in the search field, the API returns the error:
{"error":"Search query must be at least 2 characters long"}
In the UI, this error isn't clearly explained, which may confuse users and make it look like search is broken.
Steps to reproduce
- Open the search page in Pictique (or try to search people when creating group)
- Enter a single character into the search field.
Curl example:
curl 'https://pictique.w3ds.metastate.foundation/api/users/search?q=a' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: en-US,en;q=0.9,ru;q=0.8' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Pragma: no-cache' \ -H 'Referer: https://pictique.w3ds.metastate.foundation/discover' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36' \ -H 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJlODgyMTFjZS05OGYzLTRhN2MtYjY0My03OTcwMDk5OTI4MDkiLCJpYXQiOjE3Njg1Njk4ODEsImV4cCI6MTc2OTE3NDY4MX0.syCAiqhg0qI7aFIymXEpcuYsllem4HP2fgmZ9Iw2yQM' \ -H 'sec-ch-ua: "Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"'
Expected behavior
User can search by 1 and more char
Supporting Media
Desktop:
- Device: any
- OS: any
- Browser: any
Metadata
Metadata
Assignees
Labels
Type
Projects
Status