rwth-acis / mobsos-surveys

A simple survey management service and Web application, being part of the MobSOS toolkit.
Other
7 stars 10 forks source link

No error message shown to user upon incomplete response submission #33

Closed Navidda closed 2 years ago

Navidda commented 3 years ago

Summary

When the user submits a response to a survey and skips some of required questions, after submission a message is displayed that the response submitted successfully while the response is dropped.

Details

The submission is sent with a POST request to /surveys/{ID}/responses/ The service responds with a 200 status code which contains a HTML page that has a message on it: "...stay tuned" The expected behavior is a 400 status code (Survey response invalid -or- questionnaire form invalid. Cause: ...)

Reproduction

  1. create a survey with Mensa questionnaire
  2. submit an empty response (skip all questions)
Navidda commented 3 years ago

I could not reproduce it on local deployment. Also because of this issue the main instance was down.

Navidda commented 3 years ago

I fixed the issue on the frontend side by making the next button disabled for the survey questions that are required but the user does not enter any answer for them