[arvados-cwl-runner] Improve error message when environment variables missing
I got this:
2018-06-27 16:34:34 arvados.cwl-runner ERROR: 'ARVADOS_API_TOKEN'
as the complete and only error message when I attempted to run arvados-cwl-runner without ARVADOS_API_TOKEN set. We need better error messages.
Similarly, this needs to say what endpoint it's attempting to connect to that it can't verify the cert for:
2018-06-27 16:45:09 arvados.cwl-runner ERROR: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
#1 Updated by Tom Clegg about 1 year ago
Just a thought -- in this situation is it possible to raise an exception in the Python SDK that is both machine-readable (recognizable exception class) and human-readable ("you need to set your API_HOST and TOKEN vars or using a settings file")? It'd be nice to handle this such that humans get useful feedback even from applications that haven't wrapped the error with their own advice.
#3 Updated by Peter Amstutz about 1 year ago
13692-acr-error @ 3a7481703542b0c95d5a23cb45b0d2e7c3ac4c9e
Improves error messages emitted by the Python SDK, and adds an extra API call early in a-c-r initialization so that errors get reported early.
$ arvados-cwl-runner --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 2018-07-05 17:03:40 arvados.cwl-runner ERROR: ARVADOS_API_TOKEN not set. Please set in /home/peter/.config/arvados/settings.conf or export environment variable.
$ arvados-cwl-runner --api=containers --submit-runner-ram=3333 --create-workflow submit_wf.cwl ../submit_test_job.json 2018-07-05 17:01:48 arvados.cwl-runner ERROR: Could not connect to https://172.17.0.2:8000/arvados/v1/users/current?alt=json [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) Possible causes: remote SSL/TLS certificate expired, or was issued by an untrusted certificate authority.