-
Notifications
You must be signed in to change notification settings - Fork 493
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
API calls, e.g. related to edit and publish, fail if request access is false and no Terms of access #8859
Comments
Discussion in tech hours suggested that going with a 409/Conflict error for these calls makes sense (vs. trying to automate any db updates to change the state) plus adding info to the release notes to remind people again to work with users to update. Given that the exact set of API calls involved isn't know, the fix should at least cover the ones above. However, it may be that it is possible to make a change, e.g. at the level of the UpdateDatasetVersionCommand to send an exception/wrapped response that will cover all affected API calls. |
We would like to see this in 5.12 because it relates to the change made in 5.11 related to fixing a bug. If it's in 5.12 we will have saved users an additional bug. |
Discussed that we give a good error message for these issues. phil - include some text that indicates that the issue is related to setting the terms of access using the API. |
What steps does it take to reproduce the issue? Noticed at QDR on existing datasets (pre v5.11) where file request access is false and there are no terms of access: API calls to add/delete files result in 400 Bad Request. Updating the terms via the UI (where one can see a warning for these datasets) resolves the API issue.
Clearer warning or, better yet, update of existing drafts, new drafts created from existing pre v5.11 versions, to start with valid requestaccess/terms of access settings. (At QDR, where it was deemed OK to always allow request access to be true, we did a db update to set fileaccessrequest = true for all drafts and the latest version of published datasets when there was no draft. Given that changing the setting in published versions may not work everywhere, something like a flyway script to update drafts, along with new code to flip fileaccessrequest = true when a new draft is created from an existing version, might work. Or just clearer API errors that indicate what has to be changed (although the QDR case was with another app using the API rather than a user who could read/interpret the error.))
Any related open or closed issues to this bug report?
~ #8832, #8847, #8742 - these appear to be other symptoms triggered by having invalid requestaccess/ToA settings, none are specifically related to API errors.
The text was updated successfully, but these errors were encountered: