lib/aws-sdk-ecr/errors.rb in aws-sdk-ecr-1.25.0 vs lib/aws-sdk-ecr/errors.rb in aws-sdk-ecr-1.26.0
- old
+ new
@@ -4,10 +4,56 @@
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
module Aws::ECR
+
+ # When ECR returns an error response, the Ruby SDK constructs and raises an error.
+ # These errors all extend Aws::ECR::Errors::ServiceError < {Aws::Errors::ServiceError}
+ #
+ # You can rescue all ECR errors using ServiceError:
+ #
+ # begin
+ # # do stuff
+ # rescue Aws::ECR::Errors::ServiceError
+ # # rescues all ECR API errors
+ # end
+ #
+ #
+ # ## Request Context
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
+ # information about the request that generated the error.
+ # See {Seahorse::Client::RequestContext} for more information.
+ #
+ # ## Error Classes
+ # * {EmptyUploadException}
+ # * {ImageAlreadyExistsException}
+ # * {ImageNotFoundException}
+ # * {ImageTagAlreadyExistsException}
+ # * {InvalidLayerException}
+ # * {InvalidLayerPartException}
+ # * {InvalidParameterException}
+ # * {InvalidTagParameterException}
+ # * {LayerAlreadyExistsException}
+ # * {LayerInaccessibleException}
+ # * {LayerPartTooSmallException}
+ # * {LayersNotFoundException}
+ # * {LifecyclePolicyNotFoundException}
+ # * {LifecyclePolicyPreviewInProgressException}
+ # * {LifecyclePolicyPreviewNotFoundException}
+ # * {LimitExceededException}
+ # * {RepositoryAlreadyExistsException}
+ # * {RepositoryNotEmptyException}
+ # * {RepositoryNotFoundException}
+ # * {RepositoryPolicyNotFoundException}
+ # * {ScanNotFoundException}
+ # * {ServerException}
+ # * {TooManyTagsException}
+ # * {UploadNotFoundException}
+ #
+ # Additionally, error classes are dynamically generated for service errors based on the error code
+ # if they are not defined above.
module Errors
extend Aws::Errors::DynamicErrors
class EmptyUploadException < ServiceError
@@ -21,11 +67,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ImageAlreadyExistsException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -37,11 +82,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ImageNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -53,11 +97,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ImageTagAlreadyExistsException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -69,11 +112,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class InvalidLayerException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -85,11 +127,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class InvalidLayerPartException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -121,11 +162,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class InvalidParameterException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -137,11 +177,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class InvalidTagParameterException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -153,11 +192,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LayerAlreadyExistsException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -169,11 +207,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LayerInaccessibleException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -185,11 +222,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LayerPartTooSmallException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -201,11 +237,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LayersNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -217,11 +252,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LifecyclePolicyNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -233,11 +267,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LifecyclePolicyPreviewInProgressException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -249,11 +282,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LifecyclePolicyPreviewNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -265,11 +297,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LimitExceededException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -281,11 +312,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class RepositoryAlreadyExistsException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -297,11 +327,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class RepositoryNotEmptyException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -313,11 +342,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class RepositoryNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -329,11 +357,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class RepositoryPolicyNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -345,11 +372,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ScanNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -361,11 +387,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ServerException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -377,11 +402,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class TooManyTagsException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -393,11 +417,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class UploadNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -409,10 +432,9 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
end
end