Class JiraRestExceptionHandler

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
fr.enedis.chutney.jira.api.JiraRestExceptionHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

@ControllerAdvice public class JiraRestExceptionHandler extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
  • Field Summary

    Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<Object>
    _500(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
     
    protected org.springframework.http.ResponseEntity<Object>
    badRequest(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
     
    protected org.springframework.http.ResponseEntity<Object>
    forbidden(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
     
    protected org.springframework.http.ResponseEntity<Object>
    handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
     
    protected org.springframework.http.ResponseEntity<Object>
    handleHttpMessageNotWritable(org.springframework.http.converter.HttpMessageNotWritableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
     
    protected org.springframework.http.ResponseEntity<Object>
    notFound(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
     

    Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    createProblemDetail, createResponseEntity, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodArgumentNotValid, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JiraRestExceptionHandler

      public JiraRestExceptionHandler()
  • Method Details

    • handleHttpMessageNotReadable

      protected org.springframework.http.ResponseEntity<Object> handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
      Overrides:
      handleHttpMessageNotReadable in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    • handleHttpMessageNotWritable

      protected org.springframework.http.ResponseEntity<Object> handleHttpMessageNotWritable(org.springframework.http.converter.HttpMessageNotWritableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
      Overrides:
      handleHttpMessageNotWritable in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    • _500

      @ExceptionHandler(java.lang.RuntimeException.class) public org.springframework.http.ResponseEntity<Object> _500(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
    • notFound

      @ExceptionHandler(NoJiraConfigurationException.class) protected org.springframework.http.ResponseEntity<Object> notFound(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
    • badRequest

      @ExceptionHandler(java.time.format.DateTimeParseException.class) protected org.springframework.http.ResponseEntity<Object> badRequest(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
    • forbidden

      @ExceptionHandler(java.lang.IllegalArgumentException.class) protected org.springframework.http.ResponseEntity<Object> forbidden(RuntimeException ex, org.springframework.web.context.request.WebRequest request)