From cfa5e2ef65223086affc688098455bbdd5b0239a Mon Sep 17 00:00:00 2001 From: VK-SMILECDR <88211153+VK-SMILECDR@users.noreply.github.com> Date: Thu, 21 Sep 2023 15:51:37 -0400 Subject: [PATCH] 5327 improve error code 1227 message (#5328) * Improve error code 1227 message * spotless --- .../jpa/search/builder/predicate/UriPredicateBuilder.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/UriPredicateBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/UriPredicateBuilder.java index d956199e529..5eaa3e5195e 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/UriPredicateBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/predicate/UriPredicateBuilder.java @@ -183,16 +183,15 @@ public class UriPredicateBuilder extends BaseSearchParamPredicateBuilder { myColumnUri, generatePlaceholder(createRightMatchLikeExpression(value))); } else { throw new IllegalArgumentException(Msg.code(1226) - + String.format( - "Unsupported operator specified in _filter clause, %s", - theOperation.toString())); + + String.format("Unsupported operator specified in _filter clause, %s", theOperation)); } codePredicates.add(uriPredicate); } } else { - throw new IllegalArgumentException(Msg.code(1227) + "Invalid URI type: " + nextOr.getClass()); + throw new IllegalArgumentException(Msg.code(1227) + "Invalid URI type: expected " + + UriParam.class.getName() + ", but was " + nextOr.getClass()); } }