specific error message for POST/GET requests with empty request body/search-parameters
tyrasd opened this issue · 1 comments
When performing a POST request with an empty request body (i.e. without specifying any parameter), or analogously a GET request without any search parameters, the ohsome api produces currently an error message which is a bit too specific and does not help perfectly to identify the root cause of the issue:
You need to define one of the boundary parameters (bboxes, bcircles, bpolys).
It would be better to error with a message like the following (to be tweaked!):
The query did not specify any parameters (e.g. an empty request body), please check your code.
I suppose it wasn't implemented because with the more specific error message the user will get anyway an error if there isn't a boundary parameter defined. I would make in the suggested more specific error message a reference to the necessity to define a boundary type, so that the user doesn't bounce from an error message to another.