File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
rest/resource-server/src/main/java/org/eclipse/sw360/rest/resourceserver/core Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3030import org .springframework .web .HttpRequestMethodNotSupportedException ;
3131import org .springframework .web .bind .MissingServletRequestParameterException ;
3232import org .springframework .web .bind .annotation .ControllerAdvice ;
33+ import org .springframework .web .multipart .support .MissingServletRequestPartException ;
3334import org .springframework .web .bind .annotation .ExceptionHandler ;
3435import org .springframework .web .client .HttpClientErrorException ;
3536import org .springframework .web .servlet .resource .NoResourceFoundException ;
@@ -59,8 +60,8 @@ public ResponseEntity<ErrorMessage> handleMessageNotReadableException(RuntimeExc
5960 return new ResponseEntity <>(new ErrorMessage (e , HttpStatus .BAD_REQUEST ), HttpStatus .BAD_REQUEST );
6061 }
6162
62- @ ExceptionHandler (MissingServletRequestParameterException .class )
63- public ResponseEntity <ErrorMessage > handleMissingServletRequestParameter (MissingServletRequestParameterException e ) {
63+ @ ExceptionHandler ({ MissingServletRequestParameterException .class , MissingServletRequestPartException . class } )
64+ public ResponseEntity <ErrorMessage > handleMissingServletRequestParameter (Exception e ) {
6465 return new ResponseEntity <>(new ErrorMessage (e , HttpStatus .BAD_REQUEST ), HttpStatus .BAD_REQUEST );
6566 }
6667
You can’t perform that action at this time.
0 commit comments