When using cernopendata-client as a module and importing the searcher (or downloader) method, any error will cause the entire execution flow to break. This should happen when using the cernopendata-client CLI, but elsewhere those methods should raise an Exception that the importing application can handle and carry on.
E.g., When you look for a non-existing record id:
from cernopendata_client import searcher, downloader
metadata = searcher.get_record_as_json(server=self.SERVER_HTTP_URI, recid=recid)
The script exists immediatly (without raising any Exception) and interrupting any calling action:
==> ERROR: The record id number you supplied is not valid.
When using cernopendata-client as a module and importing the searcher (or downloader) method, any error will cause the entire execution flow to break. This should happen when using the cernopendata-client CLI, but elsewhere those methods should raise an Exception that the importing application can handle and carry on.
E.g., When you look for a non-existing record id:
The script exists immediatly (without raising any Exception) and interrupting any calling action: