From 980f39ae8885de0fe17c20b8336ff353355cbd0c Mon Sep 17 00:00:00 2001 From: Mars Lan Date: Fri, 3 Apr 2020 07:40:07 -0700 Subject: [PATCH] refactor(frontend): fails loudly to help debug gms issue (#1626) This will print the full stacktrace in log to help identify various gms issues --- datahub-frontend/app/controllers/api/v1/User.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datahub-frontend/app/controllers/api/v1/User.java b/datahub-frontend/app/controllers/api/v1/User.java index 2c4e6d07c5..5cd16b13f5 100644 --- a/datahub-frontend/app/controllers/api/v1/User.java +++ b/datahub-frontend/app/controllers/api/v1/User.java @@ -17,7 +17,6 @@ import play.mvc.Security; import utils.ControllerUtil; import javax.annotation.Nonnull; -import java.security.InvalidParameterException; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; @@ -49,7 +48,7 @@ public class User extends Controller { try { corpUser = _corpUserViewDao.getByUserName(username); } catch (Exception e) { - throw new InvalidParameterException("Invalid username: " + username); + throw new RuntimeException(e); } if (corpUser == null || !corpUser.getUsername().equals(username)