wapisai / pe

0 stars 0 forks source link

Invalid index - wrong error message #2

Open wapisai opened 5 months ago

wapisai commented 5 months ago

Screenshot 2024-04-19 at 4.14.08 PM.png

error message is not correct the error here is that the index is invalid, however error message shown is that the format is invalid

Screenshot 2024-04-19 at 4.15.47 PM.png

error mesage for an index more than number of people in list is correct i would assume that the same error message should be shown for the previosu error

soc-se-bot commented 5 months ago

Team's Response

The parameter specified was a "INDEX(must be a positive Integer)". As 0 is not a positive integer, the error message said that it is invalid command format. In contrast, 10 is a valid positive integer. It is a valid format, but person with that index does not exist. This is why two different error message was displayed. They are both accurate and work as expected.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Difference in error message for edit command

image.png

image.png

There is difference between the error message when I put different values.


[original: nus-cs2103-AY2324S2/pe-interim#4783] [original labels: severity.Low type.FeatureFlaw]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Invalid command format! edit: Edits the details of the person identified by the index number used in the displayed person list. Existing values will be overwritten by the input values. Parameters: INDEX (must be a positive integer) [n/NAME] [p/PHONE] [e/EMAIL] [g/GROUP] Example: edit 1 p/91234567 e/johndoe@example.com

This might be the first error message you might received. The parameter specified was a "INDEX(must be a positive Integer)". As -1 is not a positive integer, the error message said that it is invalid command format. In contrast, 14 is a valid positive integer. It is a valid format, but person with that index does not exist. This is why two different error message was displayed. They are both accurate and work as expected.

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: [replace this with your explanation]


## :question: Issue response Team chose [`response.Rejected`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]