Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET /projects returns ERROR: levenshtein argument exceeds maximum length of 255 characters #1153

Open
jake-low opened this issue Oct 11, 2024 · 0 comments

Comments

@jake-low
Copy link
Contributor

Originally opened as osmlab/maproulette-python-client#103.

The GET /projects endpoint supports fuzzy search for projects by name using the search query parameter.

When this parameter is provided, an unexpected error is returned:

λ curl -i 'https://maproulette.org/api/v2/projects?search=trailheads'
HTTP/2 500
date: Fri, 11 Oct 2024 20:32:11 GMT
content-type: application/json
vary: Accept-Encoding,Origin
maproulette-request-id: 54673ae9-68dc-4636-97df-d94954756fc2
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=V43ywM6%2Fw8lHEzUmC4WyBOEYtBE%2BVOKG1C%2FccGd%2BvOzGUAw0Oq%2FutdG0zNoS5hnwN8PtWjddvhSjGBJUavg%2F4r56hdAk3U6mQSsUL2KYe2xhSiTdWA7HyL5NYMO9bggAgbs%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8d119e355f733098-SEA
alt-svc: h3=":443"; ma=86400

{"status":"KO","message":"ERROR: levenshtein argument exceeds maximum length of 255 characters"}

The message levenshtein argument exceeds maximum length of 255 characters comes from PostgreSQL's LEVENSHTEIN() function, which is being called in FuzzySearchParameter, in turn used by ProjectService.find().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant