From e2567e0594570fff568fcf1fac5bf1097dba340c Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Thu, 10 Oct 2024 13:30:59 +0000 Subject: [PATCH] validation failure should not trigger stack trace --- container-search/abi-spec.json | 2 +- .../yahoo/search/grouping/UnavailableAttributeException.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/container-search/abi-spec.json b/container-search/abi-spec.json index f4d67a290089..5c70d3902c8e 100644 --- a/container-search/abi-spec.json +++ b/container-search/abi-spec.json @@ -2550,7 +2550,7 @@ ] }, "com.yahoo.search.grouping.UnavailableAttributeException" : { - "superClass" : "java.lang.RuntimeException", + "superClass" : "com.yahoo.processing.IllegalInputException", "interfaces" : [ ], "attributes" : [ "public" diff --git a/container-search/src/main/java/com/yahoo/search/grouping/UnavailableAttributeException.java b/container-search/src/main/java/com/yahoo/search/grouping/UnavailableAttributeException.java index 5655a4c57c97..97d6a4be5959 100644 --- a/container-search/src/main/java/com/yahoo/search/grouping/UnavailableAttributeException.java +++ b/container-search/src/main/java/com/yahoo/search/grouping/UnavailableAttributeException.java @@ -1,6 +1,8 @@ // Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.grouping; +import com.yahoo.processing.IllegalInputException; + /** * This exception is thrown by the {@link GroupingValidator} if it a {@link GroupingRequest} contains a reference to an * unavailable attribute. @@ -8,7 +10,7 @@ * @author Simon Thoresen Hult */ @SuppressWarnings("serial") -public class UnavailableAttributeException extends RuntimeException { +public class UnavailableAttributeException extends IllegalInputException { private final String clusterName; private final String attributeName;