Serverless app works on test but not in real

Hi FreshWorks developer comunity,

I’m facing a problem I’m unable to understand. When I test my app with the onTicketUpdate.json, it works like a charm, but when I upload it to FreshDesk, it doesn’t work at all. I even have a console log at the first line of the onTicketUpdateHandler function, and it doesn’t appear on the logs, nothing appears on the logs. I don’t get it.

onTicketUpdateHandler: async function (args) {
    console.log("hi");
    let { iparams, data } = args;
    let { ticket } = data;
    console.log(ticket.id);
    if (ticket.custom_fields.cf_group_creation_trigger) {
      console.log(`Getting group creator for ticket ${ticket.id}`);

      try {
        groups = await this.assignGroupCreatedBy(iparams, ticket);
      } catch (err) {
        console.log(err);
        return;
      }
    }

  }

Thanks for the help

Hi @manuelpllull

I tried the above code snippet in my test app and uploaded it as a custom app. It works fine in my test account. Please check if the app which I tried works fine in your test account by uploading it as a custom app. If that works fine you can compare that with your app and check what is missing.

test.zip (2.7 KB)

Thanks!

Hi @Mughela_Chandresh ,

don’t know why, but it worked on our production envirorment. I was really confused because, on our sandbox, it still doesn’t work, but it does in production. I don’t understand anything.

Thanks for checking it out

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.