aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/metadata.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api/metadata.py')
-rw-r--r--gn3/api/metadata.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index 156af97..35e4067 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -1,5 +1,6 @@
"""API for fetching metadata using an API"""
from http.client import RemoteDisconnected
+from urllib.error import URLError
from flask import Blueprint
from flask import jsonify
from flask import current_app
@@ -23,5 +24,5 @@ def jsonify_dataset_metadata(accession_id):
).data
)
# The virtuoso server is misconfigured or it isn't running at all
- except RemoteDisconnected:
+ except (RemoteDisconnected, URLError):
return jsonify({})