Skip to content

Commit

Permalink
Mention RestMulti in error message for dynamic media type in Multi
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand authored and holly-cummins committed Feb 8, 2024
1 parent 6bc4d09 commit 485d812
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ public void handle(ResteasyReactiveRequestContext requestContext) throws Excepti
produces = REST_MULTI_DEFAULT_SERVER_MEDIA_TYPE;
} else {
throw new IllegalStateException(
"Negotiation or dynamic media type not supported yet for Multi: please use the @Produces annotation when returning a Multi");
"Negotiation or dynamic media type resolution for Multi is only supported when using 'org.jboss.resteasy.reactive.RestMulti'");
}

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

MediaType mediaType = mediaTypes[0];
Expand Down

0 comments on commit 485d812

Please sign in to comment.