AtlasOfLivingAustralia / biocache-hubs

Biocache Hub UI grails plugin
Other
3 stars 30 forks source link

Explore Your Area fails to render if logger service is unavailable #611

Open nickdos opened 1 month ago

nickdos commented 1 month ago

EYA page includes _download.gsp that uses a getLoggerReasons taglib:

<g:each var="it" in="${alatag.getLoggerReasons()}">
    <option value="${it.id}">${it.name}</option>
</g:each>

When logger service is offline, the getLoggerReasons() method generates an exception that prevents the entire page from loading.

~Fix is to catch the exception and insert either a dummy list (same data structure as logger reasons) with the error message or use a fall-back list of reasons from the config file.~

Further investigation revealed that this code is only used by the legacy download (modal UI) and the ALA download is handled by the downloads-plugin code.

nickdos commented 1 month ago

Tested with both config settings:

useDownloadPlugin=true
useDownloadPlugin=false

and setting an invalid URL for logger service to emulate the server being down.

In all cases, the EYA page will work - downloads will still fail when logger is not available.

See screenshot for false case:

image