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

Do you have an example?

“fields”: {
“key”: “TEST” // this should be your project key
“summary”: “REST ye merry gentlemen.”,
“description”: “Creating of an issue using project keys and issue type names using the REST API”,
“issuetype”: {
“name”: “Bug”