From d14d163a60ef2b76ea21da8e0e246e90342e41b8 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 9 Sep 2024 09:02:57 +0300 Subject: [PATCH] Improve error in SimpleJsonResource This will help in debugging #43104 --- .../reactive/jackson/deployment/test/SimpleJsonResource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/resteasy-reactive/rest-jackson/deployment/src/test/java/io/quarkus/resteasy/reactive/jackson/deployment/test/SimpleJsonResource.java b/extensions/resteasy-reactive/rest-jackson/deployment/src/test/java/io/quarkus/resteasy/reactive/jackson/deployment/test/SimpleJsonResource.java index 05235155aad78..7abe9104a0b08 100644 --- a/extensions/resteasy-reactive/rest-jackson/deployment/src/test/java/io/quarkus/resteasy/reactive/jackson/deployment/test/SimpleJsonResource.java +++ b/extensions/resteasy-reactive/rest-jackson/deployment/src/test/java/io/quarkus/resteasy/reactive/jackson/deployment/test/SimpleJsonResource.java @@ -470,7 +470,8 @@ public ObjectWriter apply(ObjectMapper objectMapper, Type type) { type = ((ParameterizedType) type).getActualTypeArguments()[0]; } if (!type.getTypeName().equals(Person.class.getName())) { - throw new IllegalArgumentException("Only Person type can be handled"); + throw new IllegalArgumentException( + "Type'" + type.getTypeName() + "' cannot be handled. Only 'Person' type is valid"); } return objectMapper.writer().without(JsonWriteFeature.QUOTE_FIELD_NAMES); }