I am the tech admin for a web app, and we integrate with Drive to allows users to upload files that already exist in their drive folders. In the past day or two, we have been receiving a large number of 500 errors when executing a Files.copy command. Our logs tell us that the error is "{ error: { errors: [ [Object] ], code: 500, message: 'Internal Error' } } ".
Any advice on how to reduce the number of times this error occurs? we are estimating that this happens for 1/4 of our requests to the Google Drive SDK.
More info, as requested:
Here is the code used to copy a file to drive.
copyDriveFile = (file, callback) ->
driveRequest({
url: "https://www.googleapis.com/drive/v2/files/#{file.id}/copy?key=omitted"
method: "POST"
params:
fileId: file.id
json:
title: file.name
jwt:
email: "my-account@developer.gserviceaccount.com"
keyFile: "file-key.pem"
scopes: ['https://www.googleapis.com/auth/drive']
},(err, res, body) ->
callback err, res, body
)