-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle bad search API URL more nicely #1
Comments
I suggest a SearchConnection.verify() method or similar to test the connection and catching the HTTPError to make a shorter traceback. |
Hi Jean-Yves, Thanks for submitting the issue to github. It's a good suggestion -- I'll get to it when I can. Stephen. Stephen Pascoe +44 (0)1235 445980 From: Jean-Yves Peterschmitt [mailto:[email protected]] I wanted to try the example search on the IPSL esgf-node. Unfortunately, I had a typo in the URL ("esgf-search" instead of "esg-search"...) and I ended up with a big traceback. Example below It would be nice if the user could get a friendly warning message instead of the exception. Maybe the availability of the service at the specified URL should be tested as soon as SearchConnection is called? from pyesgf.search import SearchConnection WRONG URL below conn = SearchConnection('http://esgf-node.ipsl.fr/esgf-search/search', distrib=True) — |
I wanted to try the example search on the IPSL esgf-node. Unfortunately, I had a typo in the URL ("esgf-search" instead of "esg-search"...) and I ended up with a big traceback. Example below
It would be nice if the user could get a friendly warning message instead of the exception. Maybe the availability of the service at the specified URL should be tested as soon as SearchConnection is called?
The text was updated successfully, but these errors were encountered: