AY2324S1-CS2103T-T09-3 / tp

MIT License
0 stars 5 forks source link

Misleading error messages for EditCommand #222

Closed kohkaijie closed 11 months ago

kohkaijie commented 11 months ago

When trying to use EditCommand for doctors with patient prefixes, entering a patient prefix with an invalid input will result in an error message asking the user to input a valid input, when instead it should be showing an error telling the user that it cannot edit those fields. Here is an example below

input: edit s9851306G b/K+ expected error message: Doctors cannot have Condition or BloodType fields. actual error message: A blood type should only be of the following valid types: A+, A-, B+, B-, AB+, AB-, O+, and O-.

The expected error message is thrown when entering a valid blood type such as O+, however it should be thrown regardless if an invalid prefix is used.

However, I believe this issue is not a major issue and it is unlikely we can change it since we have to change the way we parse the inputs, we could specify in the user guide this behaviour so that users are aware of the intended behaviour.