Class MissingServletRequestPartException
java.lang.Object
java.lang.Throwable
java.lang.Exception
jakarta.servlet.ServletException
org.springframework.web.multipart.support.MissingServletRequestPartException
- All Implemented Interfaces:
- Serializable, ErrorResponse
public class MissingServletRequestPartException
extends jakarta.servlet.ServletException
implements ErrorResponse
Signals the part of a "multipart/form-data" request, identified by name
could not be found. This may be because the request is not a multipart
request, or a part with that name is not present, or because the application
is not configured correctly for processing multipart requests, for example, there
is no 
MultipartResolver.
Note: This exception does not extend from
ServletRequestBindingException because
it can also be raised at a lower level, i.e. from this package which does
low level multipart request parsing, independent of higher level request
binding features.
- Since:
- 3.1
- Author:
- Rossen Stoyanchev
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface ErrorResponseErrorResponse.Builder, ErrorResponse.Interceptor
- 
Constructor SummaryConstructorsConstructorDescriptionMissingServletRequestPartException(String requestPartName) Constructor for MissingServletRequestPartException.
- 
Method SummaryModifier and TypeMethodDescriptiongetBody()Return the body for the response, formatted as an RFC 9457ProblemDetailwhosestatusshould match the response status.Object[]Return arguments to use along with amessage codeto resolve the problem "detail" for this exception through aMessageSource.Return the name of the offending part of the multipart request.Return the HTTP status code to use for the response.Methods inherited from class jakarta.servlet.ServletExceptiongetRootCauseMethods inherited from class ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ErrorResponsegetDetailMessageArguments, getDetailMessageCode, getHeaders, getTitleMessageCode, getTypeMessageCode, updateAndGetBody
- 
Constructor Details- 
MissingServletRequestPartExceptionConstructor for MissingServletRequestPartException.- Parameters:
- requestPartName- the name of the missing part of the multipart request
 
 
- 
- 
Method Details- 
getRequestPartNameReturn the name of the offending part of the multipart request.
- 
getStatusCodeReturn the HTTP status code to use for the response.- Specified by:
- getStatusCodein interface- ErrorResponse
 
- 
getBodyReturn the body for the response, formatted as an RFC 9457ProblemDetailwhosestatusshould match the response status.- Specified by:
- getBodyin interface- ErrorResponse
 
- 
getDetailMessageArgumentsDescription copied from interface:ErrorResponseReturn arguments to use along with amessage codeto resolve the problem "detail" for this exception through aMessageSource. The arguments are expanded into placeholders of the message value, for example, "Invalid content type {0}".- Specified by:
- getDetailMessageArgumentsin interface- ErrorResponse
 
 
-