avniproject / avni-webapp

Web application for management and data entry
https://avniproject.org
GNU Affero General Public License v3.0
10 stars 42 forks source link

Error handling by code review #1306

Open mahalakshme opened 1 month ago

mahalakshme commented 1 month ago

Need:

We see that many error handling scenarios for CSV upload not done. Since there are many combinations of errors that can happen, it is easier to identify them via code review and fix them than by manual testing.

AC:

Out of scope:

Error handling in other CSV files

mahalakshme commented 2 weeks ago

Issue in this: https://github.com/avniproject/avni-server/blob/master/avni-server-api/src/test/java/org/avni/server/importer/batch/csv/writer/BulkLocationEditorIntegrationTest.java


Issue in this: https://github.com/avniproject/avni-server/blob/master/avni-server-api/src/test/java/org/avni/server/importer/batch/csv/writer/UserAndCatchmentWriterIntegrationTest.java Regarding the below:

  hasError("Invalid or Empty value specified for mandatory field Track Location"),
 hasError("Invalid or Empty value specified for mandatory field Enable Beneficiary"

Track Location and Enable Beneficiary are not mandatory fields. We can show similar error like for other fields

mahalakshme commented 2 weeks ago

@petmongrels added the above comment. Forgot to mention - so this msg

petmongrels commented 1 week ago

moved to code review, without handling the comments. Will take care of them when everyone has provided feedback.

petmongrels commented 6 days ago

Issue in this: https://github.com/avniproject/avni-server/blob/master/avni-server-api/src/test/java/org/avni/server/importer/batch/csv/writer/BulkLocationEditorIntegrationTest.java

  • 'Parent location with full hierarchy' is required - should not be showed as error and should pass - since it is not a mandatory field - only for mandatory field we need to show the error - already an AC as part of a different card

not able to follow which test this is referring to