fymbc / pe

0 stars 0 forks source link

Inconsistent error message format for edit #1

Open fymbc opened 1 week ago

fymbc commented 1 week ago

When doing edit 0, it throws an error noting invalid command format

image.png

When doing edit 8 (out of index), it throws an error noting minimum one field to edit

image.png

I think that the error messages could be more consistent because both indexes provided have the same error of being out of range! May I suggest for the team to standardise it to a same message (or a more descriptive one noting invalid index given) because edit 8 at the moment suggests to the user that it is invalid because of missing parameters and not because of invalid index!

nus-se-script commented 5 days ago

Team's Response

image.png

Team chose [response.Rejected]

Reason for disagreement: It seems like a suggestion because I provided an example on how to best fix the method.

If you want the error, 8 is not a possible index for a list of 6 people long. If you want to truly define "out of range", a simple Google search will inform you that it is a value outside the expected range of values. This is the same reason why programming languages throw an error or exception (Python's IndexError, for example) when a user input for an index is invalid/unexpected.

Your screenshot of the bug guide also implies that aside from the suggestion, my report lacks justification as to why the current design is problematic. To reiterate ICYMI, I have already provided this answer in my original report, and I quote: "edit 8 at the moment suggests to the user that it is invalid because of missing parameters and not because of invalid index". This is why it is problematic as it does not inform the user of the exact error they are making.