Remove extra error handlers from controllers

master
esensar 2017-04-16 18:09:44 +02:00
parent f2336eebdd
commit 58e4cd9c51
2 changed files with 0 additions and 12 deletions

View File

@ -3,7 +3,6 @@ package ba.steleks.controller;
import ba.steleks.error.exception.ExternalServiceException; import ba.steleks.error.exception.ExternalServiceException;
import ba.steleks.model.Media; import ba.steleks.model.Media;
import ba.steleks.repository.MediaJpaRepository; import ba.steleks.repository.MediaJpaRepository;
import ba.steleks.storage.error.exception.StorageFileNotFoundException;
import ba.steleks.storage.StorageService; import ba.steleks.storage.StorageService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.ServiceInstance;
@ -72,9 +71,4 @@ public class EventGalleryController {
return "redirect:/"; return "redirect:/";
} }
@ExceptionHandler(StorageFileNotFoundException.class)
public ResponseEntity handleStorageFileNotFound(StorageFileNotFoundException exc) {
return ResponseEntity.notFound().build();
}
} }

View File

@ -3,7 +3,6 @@ package ba.steleks.controller;
import ba.steleks.error.exception.ExternalServiceException; import ba.steleks.error.exception.ExternalServiceException;
import ba.steleks.model.TeamMedia; import ba.steleks.model.TeamMedia;
import ba.steleks.repository.TeamsMediaJpaRepository; import ba.steleks.repository.TeamsMediaJpaRepository;
import ba.steleks.storage.StorageFileNotFoundException;
import ba.steleks.storage.StorageService; import ba.steleks.storage.StorageService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.ServiceInstance;
@ -74,9 +73,4 @@ public class TeamGalleryController {
return "redirect:/"; return "redirect:/";
} }
@ExceptionHandler(StorageFileNotFoundException.class)
public ResponseEntity handleStorageFileNotFound(StorageFileNotFoundException exc) {
return ResponseEntity.notFound().build();
}
} }