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 committed Sep 27, 2023
1 parent 05ea722 commit a7a6919
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 a7a6919

Please sign in to comment.