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

specific error message for POST/GET requests with empty request body/search-parameters #227

Closed
tyrasd opened this issue Aug 16, 2021 · 1 comment · Fixed by #233
Closed
Labels
enhancement New feature or request

Comments

@tyrasd
Copy link
Member

tyrasd commented Aug 16, 2021

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.

@tyrasd tyrasd added enhancement New feature or request comments welcome Indicates that the creator of this issue/PR is open for early review comments labels Aug 16, 2021
@bonaparten
Copy link
Contributor

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.

@tyrasd tyrasd removed the comments welcome Indicates that the creator of this issue/PR is open for early review comments label Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants