You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This returns an HTTP response with status code 500 and no body. After the fix of #19522, I expected status code 401 to be returned.
This seems to happen due to this code in AbstractMessageConverterMethodProcessor around line 316:
if (isContentTypePreset || !CollectionUtils.isEmpty(producibleMediaTypes)) {
throw new HttpMessageNotWritableException(
"No converter for [" + valueType + "] with preset Content-Type '" + contentType + "'");
}
throw new HttpMediaTypeNotAcceptableException(this.allSupportedMediaTypes);
producibleMediaTypes contains the controller's application/x-protobuf, so HttpMessageNotWritableException is thrown, which is turned into a 500 status code.