code: @ExceptionHandler(MultipartException.class)
      public ResponseEntity<ExceptionInfo> handleMultipartException(final HttpServletRequest request,
              final Exception ex) {
  
          logRequest(request, ex);
  
          final List<Throwable> throwables = ExceptionUtils.getThrowableList(ex);
          final Throwable responseCause = Iterables.getLast(throwables);
  
          if (responseCause.getMessage().isEmpty()) {
              LOG.warn("Request {} lead to MultipartException without root cause message:\n{}", request.getRequestURL(),
                      ex.getStackTrace());
          }
  
          final ExceptionInfo response = createExceptionInfo(new MultiPartFileUploadException(responseCause));
          return new ResponseEntity<>(response, HttpStatus.BAD_REQUEST);
      }
docs: Method for handling exception of type {@link MultipartException} which is
  thrown in case the request body is not well formed and cannot be
  deserialized. Called by the Spring-Framework for exception handling.
  
  @param request
  the Http request
  @param ex
  the exception which occurred
  @return the entity to be responded containing the exception information
  as entity.