diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbAssetTypeSwitchNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbAssetTypeSwitchNode.java index e36df41d09..8a9f4ba7eb 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbAssetTypeSwitchNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbAssetTypeSwitchNode.java @@ -40,11 +40,11 @@ public class TbAssetTypeSwitchNode extends TbAbstractTypeSwitchNode { protected String getRelationType(TbContext ctx, EntityId originator) { if (!EntityType.ASSET.equals(originator.getEntityType())) { - throw new RuntimeException("Unsupported originator type: " + originator.getEntityType() + "!"); + throw new RuntimeException("Unsupported originator type: " + originator.getEntityType() + "! Only 'ASSET' type is allowed."); } AssetProfile assetProfile = ctx.getAssetProfileCache().get(ctx.getTenantId(), (AssetId) originator); if (assetProfile == null) { - throw new RuntimeException("Asset profile with entity id: " + originator.getId() + " wasn't found!"); + throw new RuntimeException("Asset profile for entity id: " + originator.getId() + " wasn't found!"); } return assetProfile.getName(); } diff --git a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbDeviceTypeSwitchNode.java b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbDeviceTypeSwitchNode.java index 2adb247a06..8e15a6b4a2 100644 --- a/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbDeviceTypeSwitchNode.java +++ b/rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/filter/TbDeviceTypeSwitchNode.java @@ -40,11 +40,11 @@ public class TbDeviceTypeSwitchNode extends TbAbstractTypeSwitchNode { protected String getRelationType(TbContext ctx, EntityId originator) { if (!EntityType.DEVICE.equals(originator.getEntityType())) { - throw new RuntimeException("Unsupported originator type: " + originator.getEntityType() + "!"); + throw new RuntimeException("Unsupported originator type: " + originator.getEntityType() + "! Only 'DEVICE' type is allowed."); } DeviceProfile deviceProfile = ctx.getDeviceProfileCache().get(ctx.getTenantId(), (DeviceId) originator); if (deviceProfile == null) { - throw new RuntimeException("Device profile with entity id: " + originator.getId() + " wasn't found!"); + throw new RuntimeException("Device profile for entity id: " + originator.getId() + " wasn't found!"); } return deviceProfile.getName(); }