Unable to use $db.set in server.js

Hi Team,
Am getting the following error if use the below code in Server.js file

  try {
          $db.set("DealFieldList", deal_fields_json).then(
            function (data) {
              let dealDBRes = data
              console.log("Database response no stringify: ", (dealDBRes))

              console.log("Database response", JSON.stringify(dealDBRes))
              let status = dealDBRes['Created'] ? 200 : 500
              return { dealDBRes, status: status }
            },
            function (err) {
              // Handle error
              console.log("Database failure response : ", JSON.stringify(err.status, ",", err.message))
              return { err, status: 500 }

            });
        }

Error Message


Error: connect ETIMEDOUT 104.16.26.34:443
    at extractValue (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/sync-rpc/lib/index.js:165:19)
    at /Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/sync-rpc/lib/index.js:175:12
    at request (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/sync-request/lib/index.js:28:15)
    at validateDependencies (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/validations/manifest-dependency.js:14:30)
    at Object.validate (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/validations/manifest-dependency.js:40:27)
    at /Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/cli/validate.js:28:22
    at Array.map (<anonymous>)
    at Object.run (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/cli/validate.js:17:34)
    at Command.<anonymous> (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/cli/index.js:104:67)
    at Command.listener [as _actionHandler] (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:482:17)
    at /Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1239:65
    at Command._chainOrCall (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1154:12)
    at Command._parseCommand (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1239:27)
    at Command._dispatchSubcommand (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1060:25)
    at Command._parseCommand (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1204:19)
    at Command.parseAsync (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:917:16)

if i stop the app it throws the follwing error as No coverage


    at sendMessage (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/sync-rpc/lib/index.js:146:13)
    at /Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/sync-rpc/lib/index.js:175:25
    at request (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/sync-request/lib/index.js:28:15)
    at validateDependencies (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/validations/manifest-dependency.js:14:30)
    at Object.validate (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/validations/manifest-dependency.js:40:27)
    at /Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/cli/validate.js:28:22
    at Array.map (<anonymous>)
    at Object.run (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/cli/validate.js:17:34)
    at Command.<anonymous> (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/lib/cli/index.js:104:67)
    at Command.listener [as _actionHandler] (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:482:17)
    at /Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1239:65
    at Command._chainOrCall (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1154:12)
    at Command._parseCommand (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1239:27)
    at Command._dispatchSubcommand (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1060:25)
    at Command._parseCommand (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:1204:19)
    at Command.parseAsync (/Users/desivacoumar/.nvm/versions/node/v18.19.1/lib/node_modules/fdk/node_modules/commander/lib/command.js:917:16)

NOTE: We recommend a coverage of 80% for apps that are to be published in the public marketplace.

Can someone help?

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