Skip to content

Commit

Permalink
mesh-184: resolved entity error
Browse files Browse the repository at this point in the history
  • Loading branch information
PRATHAM2002-DS committed Aug 29, 2024
1 parent 6bb108d commit c5551d9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ private void validateDomainAssetLinks(AtlasEntity entity) throws AtlasBaseExcept
throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, domainGuid);
}

if (!Objects.equals(entity.getTypeName(), DATA_DOMAIN_ENTITY_TYPE)){
String domainEntityType = domainVertex.getProperty(TYPE_NAME_PROPERTY_KEY, String.class);

if (!Objects.equals(domainEntityType, DATA_DOMAIN_ENTITY_TYPE)){
throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "Asset can be linked to only domain");
}
}
Expand Down

0 comments on commit c5551d9

Please sign in to comment.