Auto creation of issues in JIRA after execution failure

Is there a way to auto create an issue in JIRA when the execution fails. I dont believe there is such a feature in katalon. Hence Im trying to explore the aftermethod/aftertestcase hooks to update JIRA. Has any body done that?

used rest api interface