Skip to content

Commit aa263ae

Browse files
authored
Handle TooManyRedirects exception for provider connections (#2357)
1 parent f224472 commit aa263ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

optimade/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ def get_child_database_links(
248248
) from exc
249249
except (requests.ConnectionError, requests.Timeout) as exc:
250250
raise RuntimeError(f"Unable to connect to provider {provider['id']}") from exc
251+
except requests.TooManyRedirects as exc:
252+
raise RuntimeError(
253+
f"Too many redirects from provider {provider['id']}"
254+
) from exc
251255

252256
if links.status_code != 200:
253257
raise RuntimeError(

0 commit comments

Comments
 (0)