Package com.adobe.testing.s3mock.util
Class S3MockExceptionHandler
- java.lang.Object
-
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
- com.adobe.testing.s3mock.util.S3MockExceptionHandler
-
@ControllerAdvice public class S3MockExceptionHandler extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandlerResponseEntityExceptionHandlerdealing withS3Exceptions; Serializes them to response output as suitable ErrorResponses. See https://docs.aws.amazon .com/AmazonS3/latest/API/ErrorResponses.html.
-
-
Constructor Summary
Constructors Constructor Description S3MockExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<ErrorResponse>handleS3Exception(S3Exception s3Exception)Handles the givenS3Exception.-
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
-
-
-
-
Method Detail
-
handleS3Exception
@ExceptionHandler public org.springframework.http.ResponseEntity<ErrorResponse> handleS3Exception(S3Exception s3Exception)
Handles the givenS3Exception.- Parameters:
s3Exception-S3Exceptionto be handled.- Returns:
- A
ResponseEntityrepresenting the handledS3Exception.
-
-