marvin icon indicating copy to clipboard operation
marvin copied to clipboard

Detect when SSL certificates have failed

Open havok2063 opened this issue 6 years ago • 0 comments

Is your feature request related to a problem? Please describe. When the SSL certificate for a domain host is broken, this will break all Marvin remote API calls happening on the domain. When this happens, importing marvin will give a version of the following warning

/Users/Brian/anaconda2/envs/marvindev/lib/python3.5/site-packages/marvin/__init__.py:331: MarvinUserWarning: Cannot retrieve URLMap. Remote functionality will not work: Requests Connection Error: HTTPSConnectionPool(host='dr15.sdss.org', port=443): Max retries exceeded with url: /marvin/api/general/getroutemap?release=DR15&compression=json (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)'),))
  MarvinUserWarning) 

Describe the solution you'd like See if there's a way to detect when the SSL certs are broken and to display a more verbose error message or cleanly indicate to the user that remote functionality is temporarily down.

havok2063 avatar Jan 24 '19 21:01 havok2063