gu-gridh / queerlit-gui

Web frontend for Queerlit search
MIT License
0 stars 0 forks source link

Show error message if Libris service is unavailable #90

Closed arildm closed 1 year ago

arildm commented 1 year ago

The Libris API is down sometimes for maintenance.

This is what the response can look like:

HTTP/1.1 503 Service Unavailable ``` HTTP/1.1 503 Service Unavailable Date: Wed, 07 Dec 2022 15:09:58 GMT Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips mod_wsgi/4.7.1 Python/3.6 Strict-Transport-Security: max-age=63072000 Last-Modified: Mon, 06 Dec 2021 15:07:10 GMT ETag: "213-5d27b9c618380" Accept-Ranges: bytes Content-Length: 531 Content-Type: text/html; charset=UTF-8 Connection: close Underhållsarbete ```

Unfortunately, I think we cannot access even the status code, because CORS headers are missing. So we'll just have to show a generic error message anytime a Libris request fails.