Ordering by category results in http 500

Hi,
Whenever I try to get a list of POIs, ordered by category, it results in a 500 internal server error. When I use https://api.openrouteservice.org/pois to post the following:
{“request”: “pois”,“geometry”: {“geojson”: {“type”: “Point”,“coordinates”: [5.058349000000001,52.647953]},“buffer”:1000},“limit”:100,“filters”: {“category_group_ids”:[420]},“sortby”:“category”}

which results in
{“code”:500,“message”:“Internal server error”}

If I comment out the sortby, it works fine. Since this is correct according to the docs, I am assuming this is a bug?

Just now noticed that I should probably round down the coordinates, 6 decimals or more is a little over the top: but it should not cause an HTTP-500 I think.

TIA,
Stefan

Hey,

thanks for noticing :slight_smile:
This does indeed look like a bug :frowning: I have submitted an issue to the respective repository. You can follow the discussion and progress on this over there.

Best regards

Thank you!

I noticed it because I was looking for shops in a town, and thought to myself: wow, that is a long list, it would be convenient if I could order that by category - that would save me scrolling.
My current workaround is to allow a finer selection of shops, and not request the entire category group. And of course I could sort myself on the client side, but that became a bit slow.

Cheers,
Stefan

1 Like

Hey,

a little late, but I wanted to inform you that the bug has been fixed and the fixed version of the openpoiservice is running :slight_smile:

Best regards

Yes! Thank you, that was quick :slight_smile:
Just did a quick test, and that looks great. Now I can add a header to the list of results using the category, which makes it a little bit easier to navigate the results list if there are a lot of results.

Thank you again! Love it, one more item for which I won’t use that maps-product from that waaay to big search engine monstrosity anymore :wink: :grin:

1 Like