HttpMessageNotReadableException provides access to HttpInputMessage

Issue: SPR-15588
This commit is contained in:
Juergen Hoeller
2018-07-04 22:46:09 +02:00
parent fc699b2b37
commit 83faee67d5
16 changed files with 141 additions and 82 deletions

View File

@@ -212,7 +212,7 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
}
}
catch (IOException ex) {
throw new HttpMessageNotReadableException("I/O error while reading input message", ex);
throw new HttpMessageNotReadableException("I/O error while reading input message", ex, inputMessage);
}
if (body == NO_VALUE) {

View File

@@ -157,7 +157,7 @@ public class RequestResponseBodyMethodProcessor extends AbstractMessageConverter
Object arg = readWithMessageConverters(inputMessage, parameter, paramType);
if (arg == null && checkRequired(parameter)) {
throw new HttpMessageNotReadableException("Required request body is missing: " +
parameter.getExecutable().toGenericString());
parameter.getExecutable().toGenericString(), inputMessage);
}
return arg;
}