diff --git a/backend/areas/__init__.py b/backend/areas/__init__.py index 9d9b8055ef2916f176698a02f50e6e826527bf0e..2d449283aaad008d12438736faaa3c18b6fd420d 100644 --- a/backend/areas/__init__.py +++ b/backend/areas/__init__.py @@ -81,7 +81,10 @@ def api_info(): # Get latest released version from gitlab. Whether it's considered # "released" depends on which branch we're following, but usually that's # the `vX` "production" branch. - git_release = requests.get(f"https://open.greenhost.net/stackspin/stackspin/-/raw/{ref}/VERSION").text.rstrip() + git_release = 'Unknown' + result = requests.get(f"https://open.greenhost.net/stackspin/stackspin/-/raw/{ref}/VERSION", timeout=5) + if result.status_code == 200: + git_release = result.text.rstrip() results['lastRelease'] = git_release return jsonify(results)