Open dojobo opened 2 months ago
I think there should be an additional elif
statement which checks for 4xx codes, prior to else: return DataCiteError()
. Of course, there could also be a statement to check for 422 specifically.
Thanks for the report! I think we should be able to add this before we do the next release sometime in August. Pull requests are always welcome and make the process go a bit faster.
Attempting to POST an already registered DOI to DataCite results in a 422 Unprocessable Entity. However,
DataCiteError
(defined inerrors.py
) does not have a case for this scenario, so such a response ends up being cast as a DataCiteServerError, which is meant for 5xx responses. In other words, a user error is converted into a server error.