An internal server error occurred while performing this operation

An internal server error occurred while performing this operation

Hello,
I created this function as automation when a ticket is created.
  1. queryValue = {"":""};
  2. getaticket = zoho.desk.getRelatedRecords(20067793560,"threads","tickets",TicketId,1,10,queryValue);
  3. dataticket = getaticket.get("data");
  4. idthreads = dataticket.tomap().get("id");
  5. get_thread = zoho.desk.getRelatedRecordById(20067793560,"threads",idthreads.toLong(),"tickets",TicketId);
  6. content = get_thread.get("content");
  7. threads_id = get_thread.get("id");
  8. infoticket = content.getPrefix("#########________#######");
  9. realcontent = content.getSuffix("#########________#######");
  10. infoticket = infoticket.replaceAll("<div><div style=\"display: none;\">","");
  11. productList = infoticket.toList("-*-*-");
  12. dueDate = productList.get(0);
  13. teamId = productList.get(1);
  14. subjects = productList.get(2);
  15. departmentId = productList.get(3);
  16. priority = productList.get(4);
  17. contactId = productList.get(5);
  18. category = productList.get(6);
  19. subCategory = productList.get(7);
  20. idassegna = productList.get(8);
  21. recordValues = Map();
  22. recordValues.put("dueDate",dueDate);
  23. recordValues.put("teamId",teamId);
  24. recordValues.put("subject",subjects);
  25. recordValues.put("departmentId",departmentId);
  26. recordValues.put("priority",priority);
  27. recordValues.put("contactId",contactId);
  28. recordValues.put("category",category);
  29. recordValues.put("subCategory",subCategory);
  30. recordValues.put("assigneeId",idassegna);
  31. updateticket = zoho.desk.update(20067793560,"tickets",TicketId,recordValues);
  32. sendmail
  33. [
  34. from :zoho.adminuserid
  35. to :zoho.adminuserid
  36. subject :"esito funzione"
  37. message : recordValues + "<br><br> " + updateticket
  38. ]
  39. info updateticket;
I made the text with the function by inserting the number as a ticket:
  1. 32819000004773001

I'm getting this error why?
  1. {"errorCode":"INTERNAL_SERVER_ERROR","message":"An internal server error occurred while performing this operation."}