From c07593be987081ba14574c194b27f4d3a795de1f Mon Sep 17 00:00:00 2001 From: sshiv012 <122703005+sshiv012@users.noreply.github.com> Date: Mon, 10 Aug 2026 23:38:26 -0700 Subject: [PATCH] seed 1a2ddc --- .../resource/ComputingUnitAccessResource.scala | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/computing-unit-managing-service/src/main/scala/org/apache/texera/service/resource/ComputingUnitAccessResource.scala b/computing-unit-managing-service/src/main/scala/org/apache/texera/service/resource/ComputingUnitAccessResource.scala index be8a498c09e..f67b2e36619 100644 --- a/computing-unit-managing-service/src/main/scala/org/apache/texera/service/resource/ComputingUnitAccessResource.scala +++ b/computing-unit-managing-service/src/main/scala/org/apache/texera/service/resource/ComputingUnitAccessResource.scala @@ -114,17 +114,10 @@ class ComputingUnitAccessResource { final private val userDao = new UserDao(context.configuration()) /** - * Resolves an email to its user id, throwing a JAX-RS BadRequestException (400) when no - * account matches — the service registers no ExceptionMapper for IllegalArgumentException, - * so that would otherwise surface as an opaque HTTP 500. Shared by grant/revoke. + * Resolves an email to its user id. Shared by grant/revoke. */ - private def resolveUidByEmail(email: String): Integer = { - val user = userDao.fetchOneByEmail(email) - if (user == null || user.getIsPlaceholder) { - throw new BadRequestException("User with the given email does not exist") - } - user.getUid - } + private def resolveUidByEmail(email: String): Integer = + userDao.fetchOneByEmail(email).getUid @GET @Produces(Array(MediaType.APPLICATION_JSON))