{"action":"opened","issue":{"url":"https://api.github.com/repos/radical-cybertools/radical.pilot/issues/574","labels_url":"https://api.github.com/repos/radical-cybertools/radical.pilot/issues/574/labels{/name}","comments_url":"https://api.github.com/repos/radical-cybertools/radical.pilot/issues/574/comments","events_url":"https://api.github.com/repos/radical-cybertools/radical.pilot/issues/574/events","html_url":"https://github.com/radical-cybertools/radical.pilot/issues/574","id":69861479,"number":574,"title":"Unknown resource key: exception v.s. state 'failed'","user":{"login":"oleweidner","id":2249976,"avatar_url":"https://avatars.githubusercontent.com/u/2249976?v=3","gravatar_id":"","url":"https://api.github.com/users/oleweidner","html_url":"https://github.com/oleweidner","followers_url":"https://api.github.com/users/oleweidner/followers","following_url":"https://api.github.com/users/oleweidner/following{/other_user}","gists_url":"https://api.github.com/users/oleweidner/gists{/gist_id}","starred_url":"https://api.github.com/users/oleweidner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleweidner/subscriptions","organizations_url":"https://api.github.com/users/oleweidner/orgs","repos_url":"https://api.github.com/users/oleweidner/repos","events_url":"https://api.github.com/users/oleweidner/events{/privacy}","received_events_url":"https://api.github.com/users/oleweidner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-21T14:29:45Z","updated_at":"2015-04-21T14:29:45Z","closed_at":null,"body":"Currently using a non-existing resource key results in an exception:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"examples/pipeline.py\", line 140, in <module>\r\n    cluster.allocate()\r\n  File \"/tmp/test/lib/python2.7/site-packages/radical.ensemblemd-0.2_101_g450194c-py2.7.egg/radical/ensemblemd/single_cluster_environment.py\", line 136, in allocate\r\n    self._pilot = pmgr.submit_pilots(pdesc)\r\n  File \"/private/tmp/test/lib/python2.7/site-packages/radical.pilot-0.28-py2.7.egg/radical/pilot/pilot_manager.py\", line 316, in submit_pilots\r\n    resource_cfg = self._session.get_resource_config(resource_key)\r\n  File \"/private/tmp/test/lib/python2.7/site-packages/radical.pilot-0.28-py2.7.egg/radical/pilot/session.py\", line 575, in get_resource_config\r\n    raise PilotException(error_msg)\r\nradical.pilot.exceptions.PilotException: Resource key 'localhosts' is not known.\r\n```\r\n\r\nI think this should rather result into the pilot switching to state `failed` and an entry in the pilot log. Otherwise, one needs to have two code paths for radical-pilot error handling, one exception based and the other callback / state-based. AFAIK, exceptions are not really used anywhere else on API level? "}}