AY2425S1-CS2103T-F14A-3 / tp

https://ay2425s1-cs2103t-f14a-3.github.io/tp/
MIT License
0 stars 5 forks source link

[PE-D][Tester A] Misleading Error Message for Large Index in blacklist Command #217

Closed soc-pe-bot closed 6 days ago

soc-pe-bot commented 1 week ago

When using the blacklist command with a valid syntax but an excessively large index value (e.g., blacklist 100000000000000...), the application returns an "Invalid command format!" error message. This response incorrectly implies that the command syntax is invalid, while the issue is actually due to the size of the index. This could confuse users, as the command format is technically correct but the index value exceeds acceptable limits.

Steps to Reproduce Open the Clientele+ application. Enter the following command with an excessively large index number: blacklist 1000000000000000000000000

Expected Behavior The application should provide a clear message indicating that the index value is out of range rather than suggesting a formatting error. A more suitable response might be:

"The index provided is too large and not within the valid range."

Actual Behavior The application displays the following error message:

"Invalid command format! blacklist INDEX : adds a client to the blacklist. Example: 'blacklist 2' blacklists the 2nd client in the list. Alternate use: entering 'blacklist' shows all blacklisted clients."

This message implies an issue with the command syntax rather than the index value, which may mislead users to believe they entered the command incorrectly.

Screenshot

Screenshot 2024-11-08 at 5.08.57 PM.png

Suggested Improvement Update the error handling for cases where the index is syntactically valid but numerically out of range. A message clarifying the issue with the size of the index, rather than the format, would improve user experience. Suggested message:

"Index value is out of range. Please provide a valid index number within the list range."


Labels: type.FunctionalityBug severity.Low original: AlekKwek18/ped#2

rahula1008 commented 6 days ago

This is a duplicate