Skip to content

Commit ff64a75

Browse files
authored
Merge pull request quarkusio#36181 from geoand/RestMulti-error-message
Mention RestMulti in error message for dynamic media type in Multi
2 parents d4e12e4 + a7a6919 commit ff64a75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/PublisherResponseHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,14 @@ public void handle(ResteasyReactiveRequestContext requestContext) throws Excepti
308308
produces = REST_MULTI_DEFAULT_SERVER_MEDIA_TYPE;
309309
} else {
310310
throw new IllegalStateException(
311-
"Negotiation or dynamic media type not supported yet for Multi: please use the @Produces annotation when returning a Multi");
311+
"Negotiation or dynamic media type resolution for Multi is only supported when using 'org.jboss.resteasy.reactive.RestMulti'");
312312
}
313313

314314
}
315315
MediaType[] mediaTypes = produces.getSortedOriginalMediaTypes();
316316
if (mediaTypes.length != 1) {
317317
throw new IllegalStateException(
318-
"Negotiation or dynamic media type not supported yet for Multi: please use a single @Produces annotation");
318+
"Negotiation or dynamic media type resolution for Multi is only supported when using 'org.jboss.resteasy.reactive.RestMulti'");
319319
}
320320

321321
MediaType mediaType = mediaTypes[0];

0 commit comments

Comments
 (0)