dataverse
dataverse copied to clipboard
Submit to archive api can return incorrect errors
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 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."}