From 9def02763e0aae6033cf7f9ebaff274be9fa399d Mon Sep 17 00:00:00 2001 From: saxenakshitiz Date: Tue, 4 Mar 2025 23:54:50 +0530 Subject: [PATCH] chore: fix delete application rule error case --- .../config/service/LabelApplicationRuleConfigServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/label-application-rule-config-service-impl/src/main/java/org/hypertrace/label/application/rule/config/service/LabelApplicationRuleConfigServiceImpl.java b/label-application-rule-config-service-impl/src/main/java/org/hypertrace/label/application/rule/config/service/LabelApplicationRuleConfigServiceImpl.java index 070c9558..9e42d284 100644 --- a/label-application-rule-config-service-impl/src/main/java/org/hypertrace/label/application/rule/config/service/LabelApplicationRuleConfigServiceImpl.java +++ b/label-application-rule-config-service-impl/src/main/java/org/hypertrace/label/application/rule/config/service/LabelApplicationRuleConfigServiceImpl.java @@ -164,8 +164,9 @@ public void deleteLabelApplicationRule( if (customRuleDeleted || systemLabelApplicationRule.isPresent()) { responseObserver.onNext(DeleteLabelApplicationRuleResponse.getDefaultInstance()); responseObserver.onCompleted(); + } else { + throw Status.NOT_FOUND.asRuntimeException(); } - throw Status.NOT_FOUND.asRuntimeException(); } catch (Exception e) { responseObserver.onError(e); }