I am using the following code to make a copy of a file:
var backupFolder = DriveApp.getFolderById('1vOnO5aSOSFNWtOLHuAz4Lv2lsRgBwBpS');
var file = DriveApp.getFileById('1TJ_5Khw7wcqlIfbZ_-KLOQ-DsU02FsoRFYR1A3B4qAs');
file.makeCopy(file.getName(), backupFolder);
Most of the time that works without any issue.
Some times I get the following error:
We're sorry, a server error occurred. Please wait a bit and try again
Does anyone know how I can get a more meaningful error message to understand what is the issue?