mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 03:39:03 +00:00
Fix RTE resulting from using wrong Json converter on RecordTemplate
This commit is contained in:
parent
f07f545df7
commit
dd60454420
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user