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

Error 400 with no error description if visit request receives no location, but location has seats defined #46

Open
pbek opened this issue Oct 5, 2020 · 1 comment
Labels
api feature request Feature request regarding API design or new APIs without user/moderator frontend

Comments

@pbek
Copy link
Contributor

pbek commented Oct 5, 2020

Follow up of #34...

You will get an error 400 (log says io.ktor.features.BadRequestException: No seat provided but location has seats defined) if a visit POST request without the seat number is made, but the location has seats defined.

e.g.

In order to be able to show the user what the reason for the error 400 is it would be good to also return (at least) an actual error message.

There also is an error 400 if a seat is defined in the request but the location has no seats (io.ktor.features.BadRequestException: Seat provided but location has no seats defined).

(@euneuber, in case you want to watch)

@pbek
Copy link
Contributor Author

pbek commented Oct 6, 2020

The same issue is with other exceptions like io.ktor.features.BadRequestException: Seat must be <= location.seatCount, there is no way to know what happened on the frontend if there is no error message in the API.

@functionaldude functionaldude added the api feature request Feature request regarding API design or new APIs without user/moderator frontend label Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature request Feature request regarding API design or new APIs without user/moderator frontend
Projects
None yet
Development

No branches or pull requests

2 participants