If a customer has recently been migrated to v2 of Xero integration and are getting a 500 error when trying to connect, it probably means that they are currently connected.
They will need to check the Connection Status in the [Xero Integration | Xero Config] Screen and only connect if the Connection Status is Not Connected:
However, they may also get this if Xero thinks that they are still connected and if the problem persists then they will need to go into Xero to sever the connection:
They will need to go to Settings, Connected applications, Khaos Control, Disconnect (no reason required).