After upgrading to version 2.26, the URL for API features gives an syntax error because the limit “Maximum number of features for preview” (set in WFS settings) gets a “,” thousand separator (limit is given as 50000, and it shows as 50,000 in the url).
Here is the part of the url: www…/items?f=text%2Fhtml&limit=50,000
Here is the error message: {“code”:“InvalidParameterValue”,“description”:“Invalid syntax 50,000 for parameter limit”}
Get rid of that comma, numbers in all protocols are expessed without thousand separators, accepting the formatted number was an unforeseen situation that thankfully got fixed.
Hei Andrea, thank you for the reply! I have no idea where that comma is introduced, and the issue is still there after updating to version 2.26-SNAPSHOT.
The only way to avoid error is if I set “Maximum number of features for preview” in my WFS settings to 999 or less… But I do want to display more data points. Any tips? Sorry for the trouble!
Hi Marte,
sorry, I don’t know either… I checked if by any chance it was GeoServer itself to add the thousands separator in the links
but it does not seem to be the case, the code uses String.valueOf(number), which won’t add the separator.
For example, this request:
Thanks again for your reply Andrea!
IT believes it has to be a geoserver-induced comma. We installed a new geoserver without proxy-server or any extra stuff, kept all standard settings besides WFS → “Maximum number of features for preview” = 1000 and it still gives me a comma in the URL response.
Do you get the same using the API features landing page for your dataset?
Another thing, the Geoserver WFS settings says: “Maximum number of features for preview (Values <= 0 use the maximum number of features)” - but using 0 (or -1) gives me 0 data points in return, not the maximum features… Have I misunderstood?