Log roleId when switching error occurs.