Wrong error in case of given boundary polygon with invalid coordinates #214
Labels
bug
Something isn't working
comments welcome
Indicates that the creator of this issue/PR is open for early review comments
Milestone
Bug Description
The ohsome API returns an
Internal Server Error
and HTTP status code500
in almost all cases of wrong givenbpolys
value (except for boundaries lying outside the underlying data-extract polygon).The first tested request has obvious wrong coordinates with non-noded linestrings intersection. The response has the following message:
found non-noded intersection between LINESTRING ( 8.422694 49.47198, 8.426363 49.473583 ) and LINESTRING ( 8.426373 49.473593, 8.422684 49.47191 ) [ (8.42608150325082, 49.47346001300383, NaN) ]
The second tested request has only one coordinates pair. The response has the following message:
Invalid number of points in LineString (found 1 - must be 0 or >= 2)
Expected Behaviour
In both cases, the thrown exception should be caught and a
BadRequestException
should be thrown. The ohsome API should return a400
status code with an appropriate message.General Information
https://api.ohsome.org/v1
, local instance with an h2 file and connected to the cluster/elements/count
but probably allThe text was updated successfully, but these errors were encountered: