nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Inconsistent/Incorrect error message when invalid index is given #321

Open nus-pe-bot opened 2 weeks ago

nus-pe-bot commented 2 weeks ago

Summary

When the Index for a command (e.g. edit) is 0, the error given is related to "invalid command format", but when the Index given is more than the number of items listed, the error given is instead "The person index is invalid".

Steps to reproduce

  1. Type edit 0 n/test
  2. Observe error
  3. Type edit 100 n/test given the number of persons listed is less than 100
  4. Observe error

Expected

Both result in "The person index is invalid".

Observed

edit 0 n/test

image.png

edit 100 n/test

image.png

Tester Information

System Information:

Java version:


[original: nus-cs2103-AY2425S1/pe-interim#453] [original labels: severity.Low type.FunctionalityBug]

Kitty-001 commented 1 week ago

Team's Response

Thanks for mentioning this issue, I think it's mentioned in the User Guide under note of the command edit. Because index is positive integer, so 0 is considered as invalid command, while out of bound positive integers are considered invalid index.

image.png

Duplicate status (if any):

--