Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ public enum AtlasErrorCode {
NO_TYPE_NAME_ON_VERTEX(404, "ATLAS-404-00-015", "No typename found for given entity with guid: {0}"),
NO_LINEAGE_CONSTRAINTS_FOR_GUID(404, "ATLAS-404-00-016", "No lineage constraints found for requested entity with guid : {0}"),
IMPORT_NOT_FOUND(404, "ATLAS-404-00-017", "Import id {0} is not found"),
RELATIONSHIP_LABEL_NOT_FOUND(404, "ATLAS-404-00-018", "No edges found with relationship label ''{0}'' on entity {1} (guid: {2}). Either the relationship does not exist or the entity has no relationships of this type."),

METHOD_NOT_ALLOWED(405, "ATLAS-405-00-001", "Error 405 - The request method {0} is inappropriate for the URL: {1}"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -566,7 +567,11 @@ public AtlasSearchResult searchRelatedEntities(String guid, String relation, boo
if (endEntityType == null) {
if (StringUtils.isEmpty(endEntityTypeName)) {
// No edges with this label exist on the entity
throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_LABEL_NOT_FOUND, relation, entityTypeName, guid);
LOG.warn("No edges found for relation '{}' on entity '{}' (guid={}), returning empty result",
relation, entityTypeName, guid);
ret.setEntities(Collections.emptyList());
ret.setApproximateCount(0L);
return ret;
} else {
// Edges exist but entity type not in registry
throw new AtlasBaseException(AtlasErrorCode.INVALID_RELATIONSHIP_LABEL, relation, endEntityTypeName);
Expand Down
Loading