ImperialCollegeLondon / safedata_validator

Python tools to validate and publish datasets using the safedata metadata format.
https://safedata-validator.readthedocs.io/
MIT License
2 stars 4 forks source link

Cleaner error handling for `create_deposit` entry point #161

Closed jacobcook1995 closed 1 week ago

jacobcook1995 commented 2 weeks ago

At the moment if a record ID is supplied to instead of a concept ID to the create_deposit entry point, it fails in a very hard to read way. We should improve the error handling so that the user can easily understand what is going wrong

davidorme commented 2 weeks ago

I think this is a general error for the _zenodo_error_message function. The response isn't behaving as the code is expecting so I think any zenodo issue is going to raise the stack trace rather than reporting the error message correctly.