dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Submit to archive api can return incorrect errors

Open qqmyers opened this issue 2 years ago • 1 comments

The /api/admin/submitDatasetVersionToArchive endpoint returns any failure indicated by a WrappedResponse as 'api key required' and this isn't the only possible error (not finding the dataset for example) - reported by @pdurbin. Same issue in the batch version. The single version call can also fail with a null pointer if the specified version doesn't exist.

Which version of Dataverse are you using? develop

PR to follow.

qqmyers avatar Aug 09 '22 20:08 qqmyers

@qqmyers thanks, for example, I was messing up the API call, doing something like this (double ?)...

??persistentId=

... and I was getting this error...

{"status":"ERROR","message":"api key required"}

... when really the error was this (if I mess with the code locally):

{"status":"ERROR","message":"When accessing a dataset based on Persistent ID, a persistentId query parameter must be present."}

pdurbin avatar Aug 09 '22 20:08 pdurbin