@Component public class AwsServiceHelper extends Object
| Constructor and Description |
|---|
AwsServiceHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleAmazonException(com.amazonaws.AmazonServiceException amazonServiceException,
String message)
Handles the AmazonServiceException, throws corresponding exception based on status code in amazon exception.
|
public void handleAmazonException(com.amazonaws.AmazonServiceException amazonServiceException,
String message)
throws IllegalArgumentException,
ObjectNotFoundException
amazonServiceException - the AWS exception that will be handled by this method.message - the message to include with this exception.IllegalArgumentException - the exception to be thrown with a HttpStatus.SC_BAD_REQUESTObjectNotFoundException - the exception to be thrown with a HttpStatus.SC_NOT_FOUNDCopyright © 2021. All rights reserved.