CDB-1788 improved error handling and capturing all exceptions of invalid tokens to remove the user oauth if manually revoked