kab-dot / pe

0 stars 0 forks source link

Wrong error message thrown #7

Open kab-dot opened 2 months ago

kab-dot commented 2 months ago

Screenshot 2024-04-19 at 4.31.14 PM.png Wrong error message thrown, the command format is correct but the indexes provided are not present

nus-pe-script commented 2 months ago

Team's Response

This input value is misleading: it is a result of integer overflow. The max value of an java int is 2147483647, which is less than the given input value. The error does not stem from the mishandling of exceptions, and the wrong error message being thrown.

See this example of a large index still below the max value, throwing the correct message.

image.png

Firstly, it is not reasonable to expect that the application stores more than 2,000,000,000 or two billion contacts, when the DG has stated that it supports up to 1000 persons in the NFRs for typical usage. It is hence not reasonable to expect this as a normal user input. Secondly, the input is targeting integer overflows, whether by sabotage or not, and has been covered in CS2103/T guidelines, and classified under Functionality Bugs, and as such we will refer to this in consideration:

image.png

If we are to apply the previous point as stated, such a problem can only happen in case of deliberate sabotage, as iterated that our application cannot be reasonably expected to store more than 2 billion people. However, if the input is entered by user mistake (e.g. cat ran over the keyboard, but somehow only stepped on numerical keys), the input does not cause harm, (i.e. does not crash the app, corrupt the data, or make it unusable.) The system gracefully throws a generic error message and recovers.

Hence, by CS2103/T guidelines, we cannot consider this to be a bug.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: I still think this could have perhaps mentioned in the UG that there is a limit.


## :question: Issue type Team chose [`type.FunctionalityBug`] Originally [`type.FeatureFlaw`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]