Class ExceptionHandlerController


  • @ControllerAdvice
    public class ExceptionHandlerController
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleAssetCatalogException​(OCFCheckedExceptionBase ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleBadRequestException​(BadRequestException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewNotFoundRequestException​(CategoryNotFoundException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewNotFoundRequestException​(GlossaryNotFoundException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewNotFoundRequestException​(TermNotFoundException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewOmasException​(org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleLineageNotFoundException​(LineageNotFoundException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleMalformedInput​(MalformedInputException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleOpenLineageClientException​(OpenLineageServiceException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleResourceException​(org.springframework.web.client.RestClientException ex, org.springframework.web.context.request.WebRequest request)  
      protected org.springframework.http.ResponseEntity<java.lang.Object> handleUnauthorizedException​(UserNotAuthorizedException ex, org.springframework.web.context.request.WebRequest request)  
      • Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

        handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
      • Methods inherited from class java.lang.Object

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

      • ExceptionHandlerController

        public ExceptionHandlerController()
    • Method Detail

      • handleMalformedInput

        @ExceptionHandler(MalformedInputException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleMalformedInput​(MalformedInputException ex,
                                                                                                 org.springframework.web.context.request.WebRequest request)
        Parameters:
        ex - - raised exception to be handled
        request - - the initial web request - the initial web request
        Returns:
        the entity containing the response exception
      • handleAssetCatalogException

        @ExceptionHandler({InvalidParameterException.class,PropertyServerException.class})
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleAssetCatalogException​(OCFCheckedExceptionBase ex,
                                                                                                        org.springframework.web.context.request.WebRequest request)
        Parameters:
        ex - - raised exception to be handled
        request - - the initial web request
        Returns:
        the entity containing the response exception
      • handleOpenLineageClientException

        @ExceptionHandler(OpenLineageServiceException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleOpenLineageClientException​(OpenLineageServiceException ex,
                                                                                                             org.springframework.web.context.request.WebRequest request)
        Parameters:
        ex - - raised exception to be handled
        request - - the initial web request
        Returns:
        the entity containing the response exception
      • handleLineageNotFoundException

        @ExceptionHandler(LineageNotFoundException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleLineageNotFoundException​(LineageNotFoundException ex,
                                                                                                           org.springframework.web.context.request.WebRequest request)
      • handleBadRequestException

        @ExceptionHandler(BadRequestException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleBadRequestException​(BadRequestException ex,
                                                                                                      org.springframework.web.context.request.WebRequest request)
      • handleResourceException

        @ExceptionHandler(org.springframework.web.client.RestClientException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleResourceException​(org.springframework.web.client.RestClientException ex,
                                                                                                    org.springframework.web.context.request.WebRequest request)
        Parameters:
        ex - - raised exception to be handled
        request - - the initial web request
        Returns:
        the entity containing the response exception
      • handleUnauthorizedException

        @ExceptionHandler(UserNotAuthorizedException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleUnauthorizedException​(UserNotAuthorizedException ex,
                                                                                                        org.springframework.web.context.request.WebRequest request)
        Parameters:
        ex - - raised exception to be handled
        request - - the initial web request
        Returns:
        the entity containing the response exception
      • handleGlossaryViewOmasException

        @ExceptionHandler(org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewOmasException​(org.odpi.openmetadata.accessservices.glossaryview.exception.GlossaryViewOmasException ex,
                                                                                                            org.springframework.web.context.request.WebRequest request)
      • handleGlossaryViewNotFoundRequestException

        @ExceptionHandler(GlossaryNotFoundException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewNotFoundRequestException​(GlossaryNotFoundException ex,
                                                                                                                       org.springframework.web.context.request.WebRequest request)
      • handleGlossaryViewNotFoundRequestException

        @ExceptionHandler(TermNotFoundException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewNotFoundRequestException​(TermNotFoundException ex,
                                                                                                                       org.springframework.web.context.request.WebRequest request)
      • handleGlossaryViewNotFoundRequestException

        @ExceptionHandler(CategoryNotFoundException.class)
        protected org.springframework.http.ResponseEntity<java.lang.Object> handleGlossaryViewNotFoundRequestException​(CategoryNotFoundException ex,
                                                                                                                       org.springframework.web.context.request.WebRequest request)