bbbbcccd / pe

0 stars 0 forks source link

Inconsistent index error message #2

Closed bbbbcccd closed 1 week ago

bbbbcccd commented 1 week ago

There is inconsistency in the error message for index errors.

For instance, when using the default contact list with 6 entries

When a user types in edit 0 n/new name, the error message that shows is Invalid command format.

Screenshot 2024-11-15 at 4.18.51 PM.png

On the other hand, when a user types in edit 8 n/new name, the error message that shows is candidate index provided is invalid.

Screenshot 2024-11-15 at 4.19.38 PM.png

In both cases, the candidate index provided are invalid and the error message should be the same. The different error message is misleading for users. A better and clearer approach will be to show candidate index provided is invalid for all invalid indices.