Class S3MockExceptionHandler


  • @ControllerAdvice
    public class S3MockExceptionHandler
    extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    ResponseEntityExceptionHandler dealing with S3Exceptions; Serializes them to response output as suitable ErrorResponses. See https://docs.aws.amazon .com/AmazonS3/latest/API/ErrorResponses.html.
    • 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
      org.springframework.http.ResponseEntity<ErrorResponse> handleS3Exception​(S3Exception s3Exception)
      Handles the given S3Exception.
      • 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

      • S3MockExceptionHandler

        public S3MockExceptionHandler()
    • Method Detail

      • handleS3Exception

        @ExceptionHandler
        public org.springframework.http.ResponseEntity<ErrorResponse> handleS3Exception​(S3Exception s3Exception)
        Handles the given S3Exception.
        Parameters:
        s3Exception - S3Exception to be handled.
        Returns:
        A ResponseEntity representing the handled S3Exception.