Remove extra error handlers from controllers
parent
f2336eebdd
commit
58e4cd9c51
|
@ -3,7 +3,6 @@ package ba.steleks.controller;
|
|||
import ba.steleks.error.exception.ExternalServiceException;
|
||||
import ba.steleks.model.Media;
|
||||
import ba.steleks.repository.MediaJpaRepository;
|
||||
import ba.steleks.storage.error.exception.StorageFileNotFoundException;
|
||||
import ba.steleks.storage.StorageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
|
@ -72,9 +71,4 @@ public class EventGalleryController {
|
|||
|
||||
return "redirect:/";
|
||||
}
|
||||
|
||||
@ExceptionHandler(StorageFileNotFoundException.class)
|
||||
public ResponseEntity handleStorageFileNotFound(StorageFileNotFoundException exc) {
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package ba.steleks.controller;
|
|||
import ba.steleks.error.exception.ExternalServiceException;
|
||||
import ba.steleks.model.TeamMedia;
|
||||
import ba.steleks.repository.TeamsMediaJpaRepository;
|
||||
import ba.steleks.storage.StorageFileNotFoundException;
|
||||
import ba.steleks.storage.StorageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
|
@ -74,9 +73,4 @@ public class TeamGalleryController {
|
|||
return "redirect:/";
|
||||
}
|
||||
|
||||
@ExceptionHandler(StorageFileNotFoundException.class)
|
||||
public ResponseEntity handleStorageFileNotFound(StorageFileNotFoundException exc) {
|
||||
return ResponseEntity.notFound().build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in New Issue