Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document download endpoint should return 404 if physical file does not exist #10005

Closed
plittlewood-rpt opened this issue Oct 20, 2023 · 0 comments
Assignees
Labels
3 3 story points back-end Relates to back end issues bug Something isn't working

Comments

@plittlewood-rpt
Copy link
Contributor

Describe the bug
Logged from Zendesk case 912

The document download endpoint (GET platform.reapit.cloud/documents/{id}/download) currently throws an exception and returns a 500 error if the physical file does not exist in the customers document storage location. This should really be a 404. We recently introduced a HEAD method which behaves in the correct manner, so this should be easily resolved

To Reproduce
Steps to reproduce the behaviour eg:

  1. Upload a document then delete the physical file asset so the database record becomes orphaned
  2. Try to download the document via the API. Observe 500 error

Specification

  • Project: Reapit.Services.Documents
  • Fix bug as above, 404 should be returned when physical asset does not exist
@plittlewood-rpt plittlewood-rpt added bug Something isn't working back-end Relates to back end issues labels Oct 20, 2023
@plittlewood-rpt plittlewood-rpt added this to To review in Platform Backlog via automation Oct 20, 2023
@HollyJoyPhillips HollyJoyPhillips added this to To do in Platform sprint 106 via automation Oct 26, 2023
@HollyJoyPhillips HollyJoyPhillips removed this from To review in Platform Backlog Oct 26, 2023
@HollyJoyPhillips HollyJoyPhillips added the 3 3 story points label Oct 26, 2023
@plittlewood-rpt plittlewood-rpt moved this from To do to In progress in Platform sprint 106 Oct 31, 2023
@plittlewood-rpt plittlewood-rpt self-assigned this Oct 31, 2023
@plittlewood-rpt plittlewood-rpt moved this from In progress to In review in Platform sprint 106 Oct 31, 2023
@plittlewood-rpt plittlewood-rpt moved this from In review to QA in Platform sprint 106 Nov 3, 2023
@plittlewood-rpt plittlewood-rpt moved this from QA to Done in Platform sprint 106 Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 3 story points back-end Relates to back end issues bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants