diff --git a/datahub-frontend/app/controllers/api/v2/CorpUser.java b/datahub-frontend/app/controllers/api/v2/CorpUser.java index b0a2e92ee6..042e117ef2 100644 --- a/datahub-frontend/app/controllers/api/v2/CorpUser.java +++ b/datahub-frontend/app/controllers/api/v2/CorpUser.java @@ -19,6 +19,8 @@ import utils.ControllerUtil; import javax.annotation.Nonnull; import java.net.URISyntaxException; +import static com.linkedin.datahub.util.RestliUtil.*; + public class CorpUser extends Controller { private static final JsonNode EMPTY_RESPONSE = Json.newObject(); @@ -38,7 +40,7 @@ public class CorpUser extends Controller { @Nonnull public Result getCorpUser(@Nonnull String corpUserUrn) { try { - return ok(Json.toJson(_corpUserViewDao.get(corpUserUrn))); + return ok(toJsonNode(_corpUserViewDao.get(corpUserUrn))); } catch (Exception e) { if (e.toString().contains("Response status 404")) { return notFound(EMPTY_RESPONSE);