From c912ab630bc04a6b53ede39304e310721a3c9c5d Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 11 Dec 2023 15:04:31 +0200 Subject: [PATCH] Improve error message in REST Client when no matching readers found This would have made my life easier when debugging https://github.com/quarkiverse/quarkus-langchain4j/pull/125 (cherry picked from commit 2168a64b88a3ae66290c7195c370aef9afa500cf) --- .../client/impl/ClientReaderInterceptorContextImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientReaderInterceptorContextImpl.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientReaderInterceptorContextImpl.java index 200f0c5bcc8eb..99fa3837fd647 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientReaderInterceptorContextImpl.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/ClientReaderInterceptorContextImpl.java @@ -91,7 +91,8 @@ public Object proceed() throws IOException, WebApplicationException { } } - StringBuilder errorMessage = new StringBuilder("Response could not be mapped to type " + entityType); + StringBuilder errorMessage = new StringBuilder( + "Response could not be mapped to type " + entityType + " for response with media type " + mediaType); if (!contextualizers.isEmpty()) { var input = new MissingMessageBodyReaderErrorMessageContextualizer.Input() { @Override