goniszewski / grimoire

Bookmark manager for the wizards đŸ§™
https://grimoire.pro
MIT License
2.12k stars 65 forks source link

500 error when searching on clean install: "Invalid filter parameters." #92

Closed GraysonCAdams closed 7 months ago

GraysonCAdams commented 7 months ago

Describe the bug On a fresh install of Grimoire using git clone and docker-compose up, running localhost without any default settings changed, the search feature is not working.

Inspecting traffic, I can see it's attempting to filter the relevant results based on the ids parameter being passed to the http://localhost:5173/api/bookmarks endpoint, however when any IDs are being passed in the array through the parameter, it's rejecting with a 500 and:

{
    "success": false,
    "error": "Invalid filter parameters."
}

To Reproduce Steps to reproduce the behavior:

  1. Git clone
  2. docker-compose up
  3. Add a bookmark (I did it through Chrome companion extension)
  4. Try to search for title of bookmark
  5. Confirm no results show up
  6. Inspect traffic, see that ids param populates with ID of correct bookmark(s) when typing, however server is returning 500
  7. Intentionally search for incorrect bookmark, and confirm that the ids field is blank, and it returns 200

Expected behavior When the HTTP request is generated for the /api/bookmarks endpoint and an array of ids is being passed through, the server should be responding with a 200 HTTP response with the metadata of the relevant bookmarks requested, and not a 500 Internal Server Error.

Screenshots Screenshot 2024-04-21 at 11 03 55 PM

Desktop (please complete the following information):