dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Improve archiving api error handling

Open qqmyers opened this issue 2 years ago • 1 comments

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:

qqmyers avatar Aug 09 '22 20:08 qqmyers

Coverage Status

Coverage decreased (-0.0005%) to 19.98% when pulling 0c662ca3c7f4c7a23d2b7c91a45fb49248822ee6 on GlobalDataverseCommunityConsortium:GDCC/8907-fix_submit_to_archive_error_responses into 11abccfb61d28e3b9e0695cb7be85d775a83ce59 on IQSS:develop.

coveralls avatar Aug 09 '22 20:08 coveralls