trefle-api icon indicating copy to clipboard operation
trefle-api copied to clipboard

Search API Returns 500 Error

Open celopez3 opened this issue 7 months ago • 1 comments

Describe the bug Using your API key on the search url

To Reproduce Steps to reproduce the behavior:

  1. Use Postman on the following endpoint: https://trefle.io/api/v1/plants/search
  2. Add your api key and parameter q for search

Expected behavior It should return plant results

Additional context The last time anyone posted it seems was a few years ago so I'm just trying to see if anyone is still monitoring this project?

celopez3 avatar Jun 09 '25 04:06 celopez3

I second the bug report.

/api/v1/plants/search?q=… always returns HTTP 500 • Example:

curl -i "https://trefle.io/api/v1/plants/search?token=$TREFLE_TOKEN&q=coconut"

→ Returns Rails default 500 error page. • Expected: A JSON error payload (e.g. 4xx for bad input) or an empty data array if no matches. • Impact: We cannot rely on the “search” endpoint and must fall back to using filters.

Reproduction steps

Obtain a valid token from your account Issue the curl request above Observe the 500 for /plants/search

sati-bodhi avatar Jun 18 '25 02:06 sati-bodhi

Hello, thanks for the report. Search is now fixed, and should work properly.

lambda2 avatar Oct 01 '25 08:10 lambda2