CDLUC3 / ezid

CDLUC3 ezid
MIT License
10 stars 4 forks source link

200 code returned instead of 201 when creating ARKs #334

Closed mariagould closed 2 years ago

mariagould commented 2 years ago

Reported by user:

On August 11th the EZID API started returning HTTP code 200 instead of 201 when creating ARKs. The documentation states 200 is returned when updating an existing id.

This command returns 200:

curl "https://ezid.cdlib.org/shoulder/ark:/99999/fk4" -u 'uofutah:our_password' -H "Content-Type: text/plain; charset=UTF-8" -d $'_target: https://lib.utah.edu\n_profile:dc\ndc.title: curl test' -i

We've been creating ARKs everyday for several years now. On the 11th, our system started throwing errors, even though ARKs were being created successfully. We found that our code has been expecting a 201 HTTP code as per the EZID documentation, but EZID was returning 200 codes instead, hence the errors. As a workaround, we now accept 201 or 200, but EZID should only be returning 201 on creation.

datadavev commented 2 years ago

Behavior change is an oversight when correcting error condition handling. Fixed in #335