shamesjen / pe

0 stars 0 forks source link

Error Message thrown for indexes are slightly wrong. #5

Open shamesjen opened 6 months ago

shamesjen commented 6 months ago

image.png

image.png

image.png

Description

Referring to the images above, the first image is expected behaviour of the error messages. The other two messages say that the format is wrong when the format is correct but the index is wrong.

Steps to reproduce

  1. Launch the application
  2. Run editSeller 210000000000000 n/savage.
  3. Run 'editSeller 21 n/savage'.

    Expected behaviour

    At step 2, output should be the same as step 3.

    Actual behaviour

    At step 2, output is different from step 3.

    Reason for severity

    A user may be confused on why the format is wrong and might not be made aware the index is the one causing the issue.

    Ideas

    Check the error handling and use the error thrown for Step 3 / the first image.

soc-pe-bot commented 6 months ago

Team's Response

Thanks for pointing it out! The third line of the error message specifies that INDEX must be a positive integer. -1 is a non-positive integer, so the team feels that the error message provides sufficient warning.

image.png

As seen in the given PE information website, editSeller 210000000000000 n/savage is an extreme user behaviour, which is not considered a bug as stated in the website. https://nus-cs2103-ay2324s2.github.io/website/admin/tp-pe.html#functionality-bugs-2

image.png

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: You already have an error message that specifies the index is wrong, the fact that it is not throwing the error message that it should already indicates a bug.

The error message currently thrown is telling the user the format is wrong, the definition of format being image.png

In this case, the user would be confused as to why the format is wrong, which is not what the dev team should be intending to happen.