# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::GameLift # When GameLift returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::GameLift::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all GameLift errors using ServiceError: # # begin # # do stuff # rescue Aws::GameLift::Errors::ServiceError # # rescues all GameLift 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 # * {ConflictException} # * {FleetCapacityExceededException} # * {GameSessionFullException} # * {IdempotentParameterMismatchException} # * {InternalServiceException} # * {InvalidFleetStatusException} # * {InvalidGameSessionStatusException} # * {InvalidRequestException} # * {LimitExceededException} # * {NotFoundException} # * {OutOfCapacityException} # * {TaggingFailedException} # * {TerminalRoutingStrategyException} # * {UnauthorizedException} # * {UnsupportedRegionException} # # 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 ConflictException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::ConflictException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class FleetCapacityExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::FleetCapacityExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class GameSessionFullException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::GameSessionFullException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class IdempotentParameterMismatchException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::IdempotentParameterMismatchException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InternalServiceException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::InternalServiceException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidFleetStatusException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::InvalidFleetStatusException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidGameSessionStatusException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::InvalidGameSessionStatusException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidRequestException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::InvalidRequestException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class LimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::LimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class NotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::NotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class OutOfCapacityException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::OutOfCapacityException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TaggingFailedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::TaggingFailedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TerminalRoutingStrategyException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::TerminalRoutingStrategyException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnauthorizedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::UnauthorizedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedRegionException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::GameLift::Types::UnsupportedRegionException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end end end