Module: Aws::CloudFront::Errors

Extended by:
Errors::DynamicErrors
Defined in:
lib/aws-sdk-cloudfront/errors.rb

Overview

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

You can rescue all CloudFront errors using ServiceError:

begin
  # do stuff
rescue Aws::CloudFront::Errors::ServiceError
  # rescues all CloudFront 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: AccessDenied, BatchTooLarge, CNAMEAlreadyExists, CannotChangeImmutablePublicKeyFields, CloudFrontOriginAccessIdentityAlreadyExists, CloudFrontOriginAccessIdentityInUse, DistributionAlreadyExists, DistributionNotDisabled, FieldLevelEncryptionConfigAlreadyExists, FieldLevelEncryptionConfigInUse, FieldLevelEncryptionProfileAlreadyExists, FieldLevelEncryptionProfileInUse, FieldLevelEncryptionProfileSizeExceeded, IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior, IllegalUpdate, InconsistentQuantities, InvalidArgument, InvalidDefaultRootObject, InvalidErrorCode, InvalidForwardCookies, InvalidGeoRestrictionParameter, InvalidHeadersForS3Origin, InvalidIfMatchVersion, InvalidLambdaFunctionAssociation, InvalidLocationCode, InvalidMinimumProtocolVersion, InvalidOrigin, InvalidOriginAccessIdentity, InvalidOriginKeepaliveTimeout, InvalidOriginReadTimeout, InvalidProtocolSettings, InvalidQueryStringParameters, InvalidRelativePath, InvalidRequiredProtocol, InvalidResponseCode, InvalidTTLOrder, InvalidTagging, InvalidViewerCertificate, InvalidWebACLId, MissingBody, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, NoSuchFieldLevelEncryptionConfig, NoSuchFieldLevelEncryptionProfile, NoSuchInvalidation, NoSuchOrigin, NoSuchPublicKey, NoSuchResource, NoSuchStreamingDistribution, PreconditionFailed, PublicKeyAlreadyExists, PublicKeyInUse, QueryArgProfileEmpty, StreamingDistributionAlreadyExists, StreamingDistributionNotDisabled, TooManyCacheBehaviors, TooManyCertificates, TooManyCloudFrontOriginAccessIdentities, TooManyCookieNamesInWhiteList, TooManyDistributionCNAMEs, TooManyDistributions, TooManyDistributionsAssociatedToFieldLevelEncryptionConfig, TooManyDistributionsWithLambdaAssociations, TooManyFieldLevelEncryptionConfigs, TooManyFieldLevelEncryptionContentTypeProfiles, TooManyFieldLevelEncryptionEncryptionEntities, TooManyFieldLevelEncryptionFieldPatterns, TooManyFieldLevelEncryptionProfiles, TooManyFieldLevelEncryptionQueryArgProfiles, TooManyHeadersInForwardedValues, TooManyInvalidationsInProgress, TooManyLambdaFunctionAssociations, TooManyOriginCustomHeaders, TooManyOriginGroupsPerDistribution, TooManyOrigins, TooManyPublicKeys, TooManyQueryStringParameters, TooManyStreamingDistributionCNAMEs, TooManyStreamingDistributions, TooManyTrustedSigners, TrustedSignerDoesNotExist