Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return 2XX HTTP Code for Successful Metadata Save Despite DOI Service Errors #2057

Open
vchendrix opened this issue Jan 28, 2025 · 2 comments
Assignees

Comments

@vchendrix
Copy link
Collaborator

Description:
When the DOI Service throws an error on saving a metadata object, it returns a 500 error but still saves the object. This prevents the creation of a resource map in downstream clients. In cases where there are DOI service errors, a 2XX code should be returned if the data was successfully saved. Metacat already emails notifications for any DOI service failures.

Steps to Reproduce:

  1. Authenticate the user.
  2. Submit a package that requires metadata registration with DOI.
  3. Observe the logs when DOI throws an error and note the 500 error return event though the object was saved.

Expected Behavior:
A 2XX HTTP code should be returned if the data object was updated.

Actual Behavior:
A 500 HTTP code is returned.

Logs from API:

2024-10-21T23:02:48.870 ERROR 698f9f54 http://orcid.org/XXXX essdive_package_service.api.package - error:'DataONE Exception: MNodeService.update - The object ess-dive-5980c4971d8a725-XXXXX has been saved successfully on Metacat. However, the new metadata can't be registered on the DOI service: DOIlinkService.getMetadata - can't get the metadata for id 10.15485/2448101 since
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
The proxy server could not handle the request<p>Reason: <strong>DNS lookup failure for: lxinput1.doi.gov</strong></p></p>
</body></html>
'

Message from Metacat

Dear operators:

Metacat got the following error message when it interacted with the OSTI ELink Service.

Server: data.ess-dive.lbl.gov

OstiDOIService.submitDOIMetadata - can't get the OSTI status of id doi:10.15485/2482624 since:
Connection reset

Proposed Solution:

  • Return a 2XX code to the user and email system administrators with details about the error.
  • Log detailed error messages for DOI failures without halting the resource map creation process.

Additional Notes:

  • We have seen this happen in Metacat UI as well as our API.
@mbjones
Copy link
Member

mbjones commented Jan 29, 2025

@taojing2002 @artntek Can you comment on the ramifications of this issue, and if the proposed solution seems like a reasonable way forward. It seems we could have different reasons for failures to issue the DOIs (including the DOI service is down, our configuration or credentials are out of date, the network is out, the request is malformed). The first of those are cases where we probably just need to try again later, or reconfigure and try again. The last case is one where an admin is probably needs to fully address the issue after notification.

@taojing2002
Copy link
Contributor

Hi @vchendrix. This issue is a duplicate of this ticket, which was fixed in the Metacat 3.0.0 release. As your suggestion, Metacat now returns 2XX even though the doi registration fails,

But we need to improve the notification or re-try when the doi registration fails as the suggestion from Matt's above comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants