GIScience / ohsome-api

API for analysing OpenStreetMap history data
https://api.ohsome.org
GNU Affero General Public License v3.0
47 stars 8 forks source link

Internal Server Error when using `changeset:…` filter in non-contribution views #289

Closed joker234 closed 1 year ago

joker234 commented 1 year ago

Bug Description

When using non-contribution views (i.e. /elements/count) you get an Internal Server Error without a proper error message when a changeset filter is set (i.e. changeset:123).

General Information

Please include the following general information about the issue and list any additional steps needed to reproduce the bug.

Expected Behaviour

Throwing a proper error message

Further Information

Error Messages, Logs, Screenshots

{
  "timestamp": "2023-01-04T12:55:58.576+00:00",
  "status": 500,
  "error": "Internal Server Error",
  "path": "/elements/count"
}
tyrasd commented 1 year ago

odd. I can't reproduce the issue with a simple filter like type:way and changeset:1: https://api.ohsome.org/v1/elements/count?bboxes=8.67%2C49.39%2C8.71%2C49.42&filter=type:way%20and%20changeset:1&format=json&time=2022-01-01

tyrasd commented 1 year ago

ah ok, I see now that the error only occurs if the bbox+filter combination includes any "potentially" matching objects. Like in this query:

https://api.ohsome.org/v1/elements/count?bboxes=8.67%2C49.39%2C8.71%2C49.42&filter=type:way%20and%20changeset:55639048&format=json&time=2022-01-01

The cause for this is the exception thrown at: https://github.com/GIScience/oshdb/blob/master/oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/ChangesetIdFilterEquals.java#L34