This function is showing error messages

moralis.cloud.define("getNFT", async (request) => {
  const logger = moralis.cloud.getlogger()
  
  let NFTId = request.params.nftId;
  let HexId = parseint(NFTId).tostring(16);
  let paddedHex = ("0000000000000000000000000000000000000000000000000000000000000000" + HexId).slice(-64)
  logger.info(paddedHex);
  moralis.coud.httpRequest({"url https://fdnswvxwf0mw.usemoralis.com:2053/server/" + paddedHex + ".json"})
  .then(function(httpResponse){
    return httpResponse.text;
  })
  
})

Please make sure that M and C in Moralis.Cloud.define() are in uppercase.
Same goes for Moralis.Cloud.getLogger() aswell Moralis.Cloud.httpRequest

1 Like