diff --git a/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java b/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java index bfbd2778b2..d79e472aa5 100644 --- a/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java +++ b/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java @@ -72,6 +72,9 @@ public class WebServiceAdmin implements DBWServiceAdmin { public AdminUserInfo getUserById(@NotNull WebSession webSession, @NotNull String userId) throws DBWebException { try { SMUser smUser = webSession.getAdminSecurityController().getUserById(userId); + if (smUser == null) { + throw new DBException("User '" + userId + "' not found"); + } return new AdminUserInfo(webSession, new WebUser(smUser)); } catch (Exception e) { throw new DBWebException("Error getting user - " + userId, e);