shaunlxw / pe

0 stars 0 forks source link

marka, unmarka: inaccurate error message #13

Open shaunlxw opened 4 months ago

shaunlxw commented 4 months ago

Similar to #11,

Input:

  1. marka/unmarka 1 a
  2. marka/unmarka 1 0

image.png

nus-pe-script commented 4 months ago

Team's Response

The input provided is clearly invalid and does not follow the correct command format that is described in the UG. Furthermore, the error message shown also displays the correct command format that should be provided. In this case, since a character was provided for the WEEK_NUMBER parameter instead of an integer, it is indeed an incorrect command format.

Severity changed to Low since it does not affect normal operations of our product, and the error would not be encountered at all if the user followed our UG closely.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Command format refers to the number and order of parameters, while input validation refers to whether the given value of input is within the valid constraints. This issue introduces invalid inputs instead of invalid command format.

The input provided is clearly invalid and does not follow the correct command format that is described in the UG.

In the example inputs given above, the input is invalid, but the command format is in fact correct. The command format for marka (and similarly for unmarka) is given as marka INDEX WEEK_NUMBER in which both example inputs given above satisfy.

In the example inputs given above, in 1, a character was given instead of integer. In 2, an integer was given but not a valid week number. The error message in both of these cases are inaccurate as it says invalid command format when format is valid. Comparing this output with the command marka 1 1, it should output a similar error message of "The week provided is invalid".

image.png


## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.Medium`] - [x] I disagree **Reason for disagreement:** This bug causes more than minor inconvenience to users, as it does not aid user in recovering from erroneous inputs. Showing "Invalid command format" when command format is valid can confuse users and cause them to spend time figuring out what is wrong with their command format. Further, the solution for "Invalid command format" in the UG states "Ensure that all required fields are provided", which user already did provide.