Skip to content

CrossRef timeouts fail gracefully

Dan Visel requested to merge citation-crossref-error-checking-clean into main

The CrossRef metadata API was failing today – this is the first time this has happened. When it times out, we weren't handling the error gracefully. This MR fixes that. You can look at the API status here: https://status.crossref.org – the one we're using is called "Metadata search".

One thing we could do that I was going to do for a demo is to add in a timeout on the Axios calls to CrossRef – it takes a while for this to fail, and the front-end throbber keeps spinning and spinning. With a timeout set to 2 seconds, we don't get in the way of the frontend. Thankfully, the API was working for the demo, so I didn't put that in. When the API was working today, it was taking a while – a timeout of 5000 was too soon. So I'm not sure if there should be a value here?

(This is the same as an earlier MR – but that one was off of my local branch and was messy. This one's a lot cleaner.)


Edited by Vignesh Devendran

Merge request reports