Strange error response when deleting replaced file via API
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
- Create dataset
- Upload file
- Get and store ID of the uploaded file
- Publish dataset
- Replace file https://guides.dataverse.org/en/latest/api/native-api.html#replacing-files
- Try to delete file using the old file ID (from step 3) https://guides.dataverse.org/en/latest/api/native-api.html#deleting-files
- Receive error message: status code 400 +
{'status': 'ERROR', 'message': 'Delete failed for file ID 95 (CommandException): Command edu.harvard.iq.dataverse.engine.command.impl.UpdateDatasetVersionCommand@263fcde5 failed: Object: null is not a known Entity type.'}
-
To whom does it occur (all users, curators, superusers)?
API users
-
What did you expect to happen?
I expected to receive a readable error message telling me why the file cannot be deleted (it has already been published and subsequently replaced)
Which version of Dataverse are you using?
6.1
Any related open or closed issues to this bug report?
not aware of any
Screenshots:
/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented replacing-files and deleting-files API sequence in Dataverse 6.1, using the old file ID after replacement. Trace the delete-file API handling and error response; done means the request returns a readable explanation that the published, replaced file cannot be deleted instead of the Entity type exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100