Jweng88 / pe

0 stars 0 forks source link

Different error messages for invalid integer index #1

Open Jweng88 opened 10 months ago

Jweng88 commented 10 months ago

Steps:

  1. When typing the command select 9 for a list size of 8, the error message displayed is "the course index provided is invalid" as shown in the screenshot below.

image.png

  1. However, when typing the same command select 999999999999999, the error message displayed is "Invalid command format" but the expected output should still be "the course index provided is invalid".

image.png

Perhaps can handle the errors when there is an integer overflow?

nus-se-bot commented 10 months ago

Team's Response

image.png

As seen in the screenshot, this is considered extreme user behaviour. It is unrealistic to assume a TA to have courses/students anywhere close to the tested value.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Although the tested value is large, it is possible for such input to be entered by user mistake. In the case where the user mistakenly enters an integer value large enough to cause integer overflow, the error message would display "Invalid command format!" which would confuse the user since it is the correct command format but invalid index. From the screenshot below, it states that problems caused by integer overflow should not affect how the features behave, so the error message displayed should remain as "index provided is invalid".

image.png

Furthermore, there was no mention of the maximum integer to be accepted in the INDEX field, therefore, a user accidentally entering a larger index that causes integer overflow is not an incorrect user behaviour and should be handled properly, which in this case is the error message displayed.


## :question: Issue type Team chose [`type.FunctionalityBug`] Originally [`type.FeatureFlaw`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]