No logging after fetch in function being triggered

I have a function that is triggered by creation and edition, as follows

trigger:
    - key: issue-createupdate-event
      function: createupdateEvent
      events:
        - avi:jira:created:issue
        - avi:jira:updated:issue

Inside my function i have a PUT method that updates the issue that has been created or edited.
When the issue is edited the function works as expected, but after creation the function doesn’t make the change.
I can’t see any logging in any of those cases. My last log is: “Consuming API”.
Here is the code:

try {
        console.log("Consuming API");
        
        const responseUpdateIssue = await api
            .asApp()
            .requestJira(route`/rest/api/3/issue/${issueId}`, updatePayload);

        console.log("responseUpdateIssue: ", responseUpdateIssue);
        if (responseUpdateIssue.status != 204) {
            console.error("There was an error updating the field, please contact support. ",
                "Issue: ", issueId,
                "customField: ", customField,
                "newValue: ", newValue,
            );
            return;
        }
    } catch (error) {
        console.error("Error updating the issue:", error);
    }