cedadev / archive_browser

Elasticsearch and javascript based file browser
1 stars 1 forks source link

Improvements to catalogue record fetching #124

Open watucker opened 1 year ago

watucker commented 1 year ago

We might need a better way to handle not being able to fetch a catalogue record, and probably shouldn't need to try more than one API endpoint (the MOLES catalogue) to get a cachable result. See: https://github.com/cedadev/archive_browser/blob/aaeaaadf01aad88ee27917a6172b00ca6a9f46a7/browser/views.py#L72

Unsure what the best way to handle a failure is, but at least we should remove "catalogue.ceda.ac.uk" from the list of CAT_URLS.

watucker commented 1 year ago

It's been noted that a relatively new addition to the "moles_record" function above may have caused some unexpected problems. Specifically, the code within this if block may need better error handling: https://github.com/cedadev/archive_browser/blob/35052b1eeaccd59aba8a17535f4c5954682867d7/browser/views.py#L77