Add error message for missing servlet request param.
The DefaultHandlerExceptionResolver now provides an error message in addition to setting the status of the response. Issue: SPR-9312
This commit is contained in:
@@ -22,13 +22,13 @@ import org.springframework.web.multipart.MultipartResolver;
|
||||
|
||||
/**
|
||||
* Raised when the part of a "multipart/form-data" request identified by its
|
||||
* name cannot be found.
|
||||
*
|
||||
* <p>This may be because the request is not a multipart/form-data
|
||||
*
|
||||
* either because the part is not present in the request, or
|
||||
* because the web application is not configured correctly for processing
|
||||
* multipart requests -- e.g. no {@link MultipartResolver}.
|
||||
* name cannot be found.
|
||||
*
|
||||
* <p>This may be because the request is not a multipart/form-data
|
||||
*
|
||||
* either because the part is not present in the request, or
|
||||
* because the web application is not configured correctly for processing
|
||||
* multipart requests -- e.g. no {@link MultipartResolver}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.1
|
||||
@@ -40,7 +40,7 @@ public class MissingServletRequestPartException extends ServletException {
|
||||
private final String partName;
|
||||
|
||||
public MissingServletRequestPartException(String partName) {
|
||||
super("Request part '" + partName + "' not found.");
|
||||
super("Required request part '" + partName + "' is not present.");
|
||||
this.partName = partName;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user