Improve error message for missing request body
Issue: SPR-12888
This commit is contained in:
parent
de9675bf5a
commit
13403d51e5
|
|
@ -147,7 +147,8 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter
|
|||
Object arg = readWithMessageConverters(inputMessage, methodParam, paramType);
|
||||
if (arg == null) {
|
||||
if (methodParam.getParameterAnnotation(RequestBody.class).required()) {
|
||||
throw new HttpMessageNotReadableException("Required request body is missing: " + methodParam);
|
||||
throw new HttpMessageNotReadableException("Required request body is missing: " +
|
||||
methodParam.getMethod().toGenericString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue