The 500 error means that some error happens on Google’s servers when attempting to list the files present there.
I think the problem is only related to Google Drive. Unfortunately, it is really hard to figure out why it fails, as it happens on a server we cannot access, and with credentials/data I don’t have, on an encrypted connection.
One potential route is to look at the network traffic using this approach:
Note: If you try this, be sure not to share the log files with anyone, as they can contain credentials that would allow someone to take over your google account.