dataverse
dataverse copied to clipboard
Improve archiving api error handling
What this PR does / why we need it: Improves/fixes error responses.
Which issue(s) this PR closes:
Closes #8907
Special notes for your reviewer:As far as I can tell there are no other ways than having a bad api key to trigger a WrappedResponse in the batch call but it makes sense to send the wrapped error there as well in case other WrappedResponse-generating calls are added to the method at some point (or in case I missed one).
Suggestions on how to test this: Use the submitdatasetversiontoarchive api call using a bad api key, a bad dataset id, a bad version number, etc. and verify that the errors are appropriate/not all reporting a bad api key. For the batch submit call - verify that sending a bad api key gives a reasonable message.
Does this PR introduce a user interface change? If mockups are available, please link/include them here: no
Is there a release notes update needed for this change?: no?
Additional documentation: