mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-03 20:27:50 +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 javax.annotation.Nonnull;
 | 
				
			||||||
import java.net.URISyntaxException;
 | 
					import java.net.URISyntaxException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static com.linkedin.datahub.util.RestliUtil.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class CorpUser extends Controller {
 | 
					public class CorpUser extends Controller {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static final JsonNode EMPTY_RESPONSE = Json.newObject();
 | 
					    private static final JsonNode EMPTY_RESPONSE = Json.newObject();
 | 
				
			||||||
@ -38,7 +40,7 @@ public class CorpUser extends Controller {
 | 
				
			|||||||
    @Nonnull
 | 
					    @Nonnull
 | 
				
			||||||
    public Result getCorpUser(@Nonnull String corpUserUrn) {
 | 
					    public Result getCorpUser(@Nonnull String corpUserUrn) {
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
            return ok(Json.toJson(_corpUserViewDao.get(corpUserUrn)));
 | 
					            return ok(toJsonNode(_corpUserViewDao.get(corpUserUrn)));
 | 
				
			||||||
        } catch (Exception e) {
 | 
					        } catch (Exception e) {
 | 
				
			||||||
            if (e.toString().contains("Response status 404")) {
 | 
					            if (e.toString().contains("Response status 404")) {
 | 
				
			||||||
                return notFound(EMPTY_RESPONSE);
 | 
					                return notFound(EMPTY_RESPONSE);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user