aws-lightsail-bucket/src/main/java/software/amazon/lightsail/bucket/BaseHandlerStd.java [70:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static ProgressEvent<ResourceModel, CallbackContext> handleError(final Exception e,
                                                                          final ResourceModel resourceModel, final CallbackContext callbackContext,
                                                                          final List<String> ignoreErrorCodes, final Logger logger, final String errorLocation) {

    logger.log(String.format("Error during operation: %s, Error message: %s", errorLocation, e.getMessage()));
    logger.log(Arrays.toString(e.getStackTrace()));

    if (e instanceof AwsServiceException) {
      final String errorCode = ((AwsServiceException) e).awsErrorDetails().errorCode();

      if (ignoreErrorCodes.contains(errorCode)) {
        logger.log("This error is expected at this stage. Continuing execution.");
        return ProgressEvent.progress(resourceModel, callbackContext);
      }
      logger.log(String.format("%s", ((AwsServiceException) e).awsErrorDetails()));

      switch (errorCode) {
        case NotFoundException:
          return ProgressEvent.defaultFailureHandler(new CfnNotFoundException(e),
                  HandlerErrorCode.NotFound);
        case InvalidInputException:
        case InvalidParameterCombination:
        case InvalidQueryParameter:
        case InvalidAction:
        case ValidationError:
        case MissingParameter:
        case OperationFailureException:
          return ProgressEvent.defaultFailureHandler(new CfnInvalidRequestException(e),
                  HandlerErrorCode.InvalidRequest);
        case ThrottlingException:
          return ProgressEvent.defaultFailureHandler(new CfnThrottlingException(e), HandlerErrorCode.Throttling);
        case NotAuthorized:
        case OptInRequired:
        case AccessDeniedException:
        case UnauthenticatedException:
          return ProgressEvent.defaultFailureHandler(new CfnAccessDeniedException(e),
                  HandlerErrorCode.AccessDenied);
        case InternalFailure:
        case ServiceUnavailable:
        default:
          return ProgressEvent.defaultFailureHandler(new CfnGeneralServiceException(e),
                  HandlerErrorCode.GeneralServiceException);
      }
    }
    return ProgressEvent.defaultFailureHandler(new CfnGeneralServiceException(e),
            HandlerErrorCode.GeneralServiceException);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-lightsail-staticip/src/main/java/software/amazon/lightsail/staticip/BaseHandlerStd.java [71:116]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public static ProgressEvent<ResourceModel, CallbackContext> handleError(final Exception e,
                                                                          final ResourceModel resourceModel, final CallbackContext callbackContext,
                                                                          final List<String> ignoreErrorCodes, final Logger logger, final String errorLocation) {

    logger.log(String.format("Error during operation: %s, Error message: %s", errorLocation, e.getMessage()));
    logger.log(Arrays.toString(e.getStackTrace()));

    if (e instanceof AwsServiceException) {
      final String errorCode = ((AwsServiceException) e).awsErrorDetails().errorCode();

      if (ignoreErrorCodes.contains(errorCode)) {
        logger.log("This error is expected at this stage. Continuing execution.");
        return ProgressEvent.progress(resourceModel, callbackContext);
      }
      logger.log(String.format("%s", ((AwsServiceException) e).awsErrorDetails()));

      switch (errorCode) {
        case NotFoundException:
          return ProgressEvent.defaultFailureHandler(new CfnNotFoundException(e),
                  HandlerErrorCode.NotFound);
        case InvalidInputException:
        case InvalidParameterCombination:
        case InvalidQueryParameter:
        case InvalidAction:
        case ValidationError:
        case MissingParameter:
        case OperationFailureException:
          return ProgressEvent.defaultFailureHandler(new CfnInvalidRequestException(e),
                  HandlerErrorCode.InvalidRequest);
        case ThrottlingException:
          return ProgressEvent.defaultFailureHandler(new CfnThrottlingException(e), HandlerErrorCode.Throttling);
        case NotAuthorized:
        case OptInRequired:
        case AccessDeniedException:
        case UnauthenticatedException:
          return ProgressEvent.defaultFailureHandler(new CfnAccessDeniedException(e),
                  HandlerErrorCode.AccessDenied);
        case InternalFailure:
        case ServiceUnavailable:
        default:
          return ProgressEvent.defaultFailureHandler(new CfnGeneralServiceException(e),
                  HandlerErrorCode.GeneralServiceException);
      }
    }
    return ProgressEvent.defaultFailureHandler(new CfnGeneralServiceException(e),
            HandlerErrorCode.GeneralServiceException);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



