@ExceptionHandler(FileTypeErrorException.class)
public ResponseDto<?> handlingFileTypeErrorException(){
return ResponseDto.fail("FILE_TYPE_ERROR","이미지가 아닙니다.");
}
public class FileTypeErrorException extends IllegalArgumentException{
}
if(!type.startsWith("image")){
throw new FileTypeErrorException();
}