inveniosoftware / react-invenio-deposit

React application for Invenio deposit forms.
https://react-invenio-deposit.readthedocs.io
MIT License
3 stars 46 forks source link

files: handle deletion failure #383

Open zzacharo opened 3 years ago

zzacharo commented 3 years ago

Package version (if known): v6.0

Describe the bug

When a file is failing to be deleted the error is not reported in the UI.

Steps to Reproduce

  1. Go to the uploads page and create a draft by uploading a file e.g test.txt
  2. Open a new window and navigate to the same draft. You will see in both windows the same file i.e test.txt
  3. Delete the file e.g test.txt from one of the 2 windows
  4. Now try to delete the same from the other one
  5. The error that you can see in the network panel is that the file doesn't exist thus it's failing to get deleted.

Expected behavior

We should report the error in the screen by indicating to the user to refresh the page or we can proactively delete the file from the client side as it's already been erased.