Module: Aws::CloudTrail::Errors

Defined in:
gems/aws-sdk-cloudtrail/lib/aws-sdk-cloudtrail/errors.rb

Overview

When CloudTrail returns an error response, the Ruby SDK constructs and raises an error. These errors all extend Aws::CloudTrail::Errors::ServiceError < Errors::ServiceError

You can rescue all CloudTrail errors using ServiceError:

begin
  # do stuff
rescue Aws::CloudTrail::Errors::ServiceError
  # rescues all CloudTrail API errors
end

Request Context

ServiceError objects have a #context method that returns information about the request that generated the error. See Seahorse::Client::RequestContext for more information.

Error Classes

Additionally, error classes are dynamically generated for service errors based on the error code if they are not defined above.

Defined Under Namespace

Classes: CloudTrailARNInvalidException, CloudTrailAccessNotEnabledException, CloudWatchLogsDeliveryUnavailableException, InsightNotEnabledException, InsufficientDependencyServiceAccessPermissionException, InsufficientEncryptionPolicyException, InsufficientS3BucketPolicyException, InsufficientSnsTopicPolicyException, InvalidCloudWatchLogsLogGroupArnException, InvalidCloudWatchLogsRoleArnException, InvalidEventCategoryException, InvalidEventSelectorsException, InvalidHomeRegionException, InvalidInsightSelectorsException, InvalidKmsKeyIdException, InvalidLookupAttributesException, InvalidMaxResultsException, InvalidNextTokenException, InvalidParameterCombinationException, InvalidS3BucketNameException, InvalidS3PrefixException, InvalidSnsTopicNameException, InvalidTagParameterException, InvalidTimeRangeException, InvalidTokenException, InvalidTrailNameException, KmsException, KmsKeyDisabledException, KmsKeyNotFoundException, MaximumNumberOfTrailsExceededException, NotOrganizationMasterAccountException, OperationNotPermittedException, OrganizationNotInAllFeaturesModeException, OrganizationsNotInUseException, ResourceNotFoundException, ResourceTypeNotSupportedException, S3BucketDoesNotExistException, TagsLimitExceededException, TrailAlreadyExistsException, TrailNotFoundException, TrailNotProvidedException, UnsupportedOperationException