-
Couldn't load subscription status.
- Fork 7
Filling and updating Document Article metadata #1211
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
One edge case to consider: The cases you outlined (e.g. PubMed failed, CrossRef succeeded) may come about for unintended conditions. For instance, PubMed may fail not because it doesn’t have anything but because it just errored out.
It may not make that much difference in practice on the whole, but it’s worth consideration for future. It could cause hard to diagnose bugs w.r.t. the paper/doc association.
Does the existing code differentiate between types of errors currently?
Good point - I think we already have capability to differentiate between HTTP code (timeout, 500 etc) and empty results (HTTP OK), but just never used them. I'll take a look. |
# Conflicts: # src/server/routes/api/document/crossref/works.js
|
The logic for Still need to think about about what to do in each case. |
|
Update now considers whether an article record is found from a source (PubMed, CrossRef) and whether it was not found (but the HTTP response status was OK). If ANY HTTP status error occurs, all bets are off and we tumble down into the default. This is the same with the case where neither source finds an article (as before). |
|
Good idea. That sounds sensible. Let's merge |

Modifying the function that initially fills and updates article metadata from source to include:
Table Test cases evaluated (as of Oct 11, 2023)
Refs #1201 #961