Unable to install custom app in freshdesk

Hi Team,

I am unable to install my freshdesk custom app. After clicking on install button its throwing error as “There was an error during installation if this issue persists, please contact support”.

Please find the server.js code below

var mysql = require('mysql');

var db_con = mysql.createConnection({
  host: "11.111.111.111",
  user: "demo_user",
  password: "aaaaaaaaaaaa@aaa",
  database: "demo_db"
});


  db_con.connect(function (err) {
    if (err) {
      console.log("err occured while connecting db", err);
      throw err;
    }
    else {
      console.log("successfully connected with db in ec2 instance");
    }
  
  });


exports = {

   onAppInstallCallback: async function (payload) {
    console.log("Logging arguments from onAppInstallevent: " + JSON.stringify(payload));
    var on_app_ins_payload_iparams = payload.iparams;
    console.log("on_app_ins_payload_iparams", on_app_ins_payload_iparams);
    var unsub_forms_not_freq = on_app_ins_payload_iparams.notification_frequency;
    var data_update_freq = on_app_ins_payload_iparams.data_update_frequency
    console.log("unsub_forms_not_freq, data_update_freq ", unsub_forms_not_freq, data_update_freq);
    
    // If the setup is successful     
    var headers = { "Authorization": "Basic SllGVVh6OWh1V1IzOXFjYTk5UEk6eA==" };
    var options = { headers: headers };
    $request.get("https://identifyyou.freshdesk.com/api/v2/agents", options)
      .then(
        function (data) {
         var res_obj = JSON.parse(data.response);
          console.log("fetch agents function response object", res_obj);
          for (i = 0; i < res_obj.length; i++) {
            // var con_detail = x.contact; 

            console.log(res_obj[i].contact.name, res_obj[i].id);
            var agent_id = [res_obj[i].id];
            var agent_name = [res_obj[i].contact.name];
            console.log(agent_id, agent_name);         
            
          }         
          renderData();
          
        },
        function (error) {
          //handle failure
          console.log("api request error", error);
          renderData({message: "Installation failed due to network error."});      

        }
      );


  }

};


Thanks,
Suman C.