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

Catch 404 from CrossRef instead of catching all errors #787

Closed
nsunami opened this issue Oct 5, 2022 · 0 comments · Fixed by #820
Closed

Catch 404 from CrossRef instead of catching all errors #787

nsunami opened this issue Oct 5, 2022 · 0 comments · Fixed by #820
Assignees
Labels
devlife Optimizations for developer experience

Comments

@nsunami
Copy link
Collaborator

nsunami commented Oct 5, 2022

As I mentioned in #747 and #785 (comment), the db mutation for adding a reference module (createReferenceModule) catches all errors trying to use CrossRef API, and then resolving to use DataCite.

This logic makes a bit harder to debug, since the console will be flooded with the error message from DataCite. I think it would be better to catch 404 from CrossRef, and then resolving to use DataCite. Any other errors will stop the execution, and be reported in the console accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devlife Optimizations for developer experience
Projects
None yet
1 participant