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

Wrong error in case of given boundary polygon with invalid coordinates #214

Closed
bonaparten opened this issue Jul 7, 2021 · 0 comments · Fixed by #215
Closed

Wrong error in case of given boundary polygon with invalid coordinates #214

bonaparten opened this issue Jul 7, 2021 · 0 comments · Fixed by #215
Labels
bug Something isn't working comments welcome Indicates that the creator of this issue/PR is open for early review comments
Milestone

Comments

@bonaparten
Copy link
Contributor

bonaparten commented Jul 7, 2021

Bug Description

The ohsome API returns an Internal Server Error and HTTP status code 500 in almost all cases of wrong given bpolys 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 a 400 status code with an appropriate message.

General Information

  • Version of the ohsome API: 1.5.0
  • API requested :https://api.ohsome.org/v1, local instance with an h2 file and connected to the cluster
  • Affected endpoint(s): tested on /elements/count but probably all
  • URL of your request: request1, request2
  • Used HTTP method: GET
  • Utilized tool/library for the request: cURL, Swagger
@bonaparten bonaparten added bug Something isn't working comments welcome Indicates that the creator of this issue/PR is open for early review comments labels Jul 7, 2021
@bonaparten bonaparten added this to the 1.6 milestone Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comments welcome Indicates that the creator of this issue/PR is open for early review comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant