Class RegionConnectorsCommonControllerAdvice
java.lang.Object
energy.eddie.spring.regionconnector.extensions.RegionConnectorsCommonControllerAdvice
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>> org.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>> handleHttpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException exception) If the HttpMessageNotReadableException was caused by an invalid enum value, a detailed error message including valid enum values is returned, otherwise a generic error message is returned.org.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>> org.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>> handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException ex) org.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>> org.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>> org.springframework.http.ResponseEntity<Map<String, List<EddieApiError>>>
-
Constructor Details
-
RegionConnectorsCommonControllerAdvice
public RegionConnectorsCommonControllerAdvice()
-
-
Method Details
-
handleHttpMessageNotReadableException
@ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<Map<String,List<EddieApiError>>> handleHttpMessageNotReadableException(org.springframework.http.converter.HttpMessageNotReadableException exception) If the HttpMessageNotReadableException was caused by an invalid enum value, a detailed error message including valid enum values is returned, otherwise a generic error message is returned.- Parameters:
exception- HttpMessageNotReadableException Exception that occurred during request parsing.- Returns:
- ResponseEntity with status code 400 and an error message.
-
handleMethodArgumentNotValidException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<Map<String,List<EddieApiError>>> handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException ex) -
handlePermissionStateTransitionException
@ExceptionHandler(PermissionStateTransitionException.class) public org.springframework.http.ResponseEntity<Map<String,List<EddieApiError>>> handlePermissionStateTransitionException(PermissionStateTransitionException ex) -
handleDataNeedNotFoundException
@ExceptionHandler(DataNeedNotFoundException.class) public org.springframework.http.ResponseEntity<Map<String,List<EddieApiError>>> handleDataNeedNotFoundException(DataNeedNotFoundException ex) -
handleUnsupportedDataNeedException
@ExceptionHandler(UnsupportedDataNeedException.class) public org.springframework.http.ResponseEntity<Map<String,List<EddieApiError>>> handleUnsupportedDataNeedException(UnsupportedDataNeedException ex)
-