Add a try except around jedi function call