-
Notifications
You must be signed in to change notification settings - Fork 0
feat: HTTP response 410 on deleted resource #56
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
Conversation
31bed00 to
88af390
Compare
88af390 to
88a62cb
Compare
24b4c8c to
d029532
Compare
d029532 to
d4a203a
Compare
maudetes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looks clean!
| if record[0].get("deleted_at") is not None: | ||
| deleted_at: str = record[0]["deleted_at"] | ||
| raise web.HTTPGone( | ||
| text=f"Resource {resource_id} has been permanently deleted on {deleted_at} by its producer. Contact the resource producer to get more information." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could point towards the dataset maybe, for an incentive to create a discussion there?
The dataset may have been deleted as well though, leading to a 410 first and then a 404 when it has been finally purged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally, this is the plan, but since it's not in the same database it needs a migration to have this info in table_index, and more DB requests on hydra's side. As it is a bit trickier, it is currently being be considered in separate PRs.
Related to issue datagouv/data.gouv.fr#1862.
Needs datagouv/hydra#340 to be merged first.