datacite icon indicating copy to clipboard operation
datacite copied to clipboard

fix: add 422 Error class and status_code to DataCiteError

Open alee opened this issue 1 year ago • 1 comments

use a defaultdict to map status codes to error classes, defaults to DataCiteServerError for status_code >= 500 and DataCiteRequestError for all others

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

alee avatar Aug 03 '24 19:08 alee

Hi @alee. Sorry for the delay in looking at this. It looks like status_code needs to be added to all the tests in order for this improvement to go through. It also might not be a bad idea to run the tests against the live DataCite endpoint and see what the actual response is. I think a bunch of the test responses don't match what DataCite currently uses. I'll also add this to my list of things to work on, but not sure when I'll get to it.

tmorrell avatar Oct 17 '24 20:10 tmorrell