Package dev.karlkadak.backend.exception
Class GlobalExceptionHandler
java.lang.Object
dev.karlkadak.backend.exception.GlobalExceptionHandler
Allows for handling exceptions globally and returning specific HTTP response codes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse> org.springframework.http.ResponseEntity
<ErrorResponse>
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handleCityAlreadyBeingTrackedException
@ExceptionHandler(CityAlreadyBeingTrackedException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleCityAlreadyBeingTrackedException(CityAlreadyBeingTrackedException ex) -
handleCityAlreadyNotBeingTrackedException
@ExceptionHandler(CityAlreadyNotBeingTrackedException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleCityAlreadyNotBeingTrackedException(CityAlreadyNotBeingTrackedException ex) -
handleCityNotFoundException
@ExceptionHandler(CityNotFoundException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleCityNotFoundException(CityNotFoundException ex) -
handleFailedCityDataImportException
@ExceptionHandler(FailedCityDataImportException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleFailedCityDataImportException(FailedCityDataImportException ex) -
handleMalformedCityNameException
@ExceptionHandler(MalformedCityNameException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleMalformedCityNameException(MalformedCityNameException ex) -
handleWeatherDataMissingException
@ExceptionHandler(WeatherDataMissingException.class) public org.springframework.http.ResponseEntity<ErrorResponse> handleWeatherDataMissingException(WeatherDataMissingException ex)
-