LSFLK / MedicinesforLK

This is the repo for Elixir, initiated in May 2022 in response to the Sri Lanka economic crisis and severe medicine shortages. The project is in collaboration with the Sri Lanka Red Cross and Ministry of Health, Sri Lanka.
https://donor-portal-medicinesfor-lk.vercel.app
Apache License 2.0
16 stars 37 forks source link

Need more meaningful error message for data upload errors #609

Open akbandara opened 1 year ago

akbandara commented 1 year ago

Is your feature request related to a problem? Please describe. When there is a data issue in a CSV upload performed in the Admin Portal, the error message doesn't provide enough information to identify which data record caused the problem, and the nature of the problem. For example, recently a data entry error resulted in a duplicate entry in the Needs CSV file. However, the error message shown didn't say that there was a duplicate primary key entry or the row in the CSV file that was causing it.

Describe the solution you'd like When a data upload error occurs, include the type of error and the row number in the CSV file that caused the error.

anjula-sack commented 1 year ago

@akbandara This needs some better error handling from the backend. Then we can show them those errors. Currently, it just throws plain SQL errors.

BKHChathuranga commented 4 months ago

May I work on this issue ? I'd love to make some contribution.