lib/aws-sdk-mediapackage/errors.rb in aws-sdk-mediapackage-1.25.0 vs lib/aws-sdk-mediapackage/errors.rb in aws-sdk-mediapackage-1.26.0

- old
+ new

@@ -4,10 +4,38 @@ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::MediaPackage + + # When MediaPackage returns an error response, the Ruby SDK constructs and raises an error. + # These errors all extend Aws::MediaPackage::Errors::ServiceError < {Aws::Errors::ServiceError} + # + # You can rescue all MediaPackage errors using ServiceError: + # + # begin + # # do stuff + # rescue Aws::MediaPackage::Errors::ServiceError + # # rescues all MediaPackage 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 + # * {ForbiddenException} + # * {InternalServerErrorException} + # * {NotFoundException} + # * {ServiceUnavailableException} + # * {TooManyRequestsException} + # * {UnprocessableEntityException} + # + # 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 ForbiddenException < ServiceError @@ -21,11 +49,10 @@ # @return [String] def message @message || @data[:message] end - end class InternalServerErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -37,11 +64,10 @@ # @return [String] def message @message || @data[:message] end - end class NotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -53,11 +79,10 @@ # @return [String] def message @message || @data[:message] end - end class ServiceUnavailableException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -69,11 +94,10 @@ # @return [String] def message @message || @data[:message] end - end class TooManyRequestsException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -85,11 +109,10 @@ # @return [String] def message @message || @data[:message] end - end class UnprocessableEntityException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -101,10 +124,9 @@ # @return [String] def message @message || @data[:message] end - end end end