1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
# 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/version-3/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
module Aws::SSO
# When SSO returns an error response, the Ruby SDK constructs and raises an error.
# These errors all extend Aws::SSO::Errors::ServiceError < {Aws::Errors::ServiceError}
#
# You can rescue all SSO errors using ServiceError:
#
# begin
# # do stuff
# rescue Aws::SSO::Errors::ServiceError
# # rescues all SSO 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
# * {InvalidRequestException}
# * {ResourceNotFoundException}
# * {TooManyRequestsException}
# * {UnauthorizedException}
#
# 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 InvalidRequestException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::SSO::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 ResourceNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::SSO::Types::ResourceNotFoundException] data
def initialize(context, message, data = Aws::EmptyStructure.new)
super(context, message, data)
end
# @return [String]
def message
@message || @data[:message]
end
end
class TooManyRequestsException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::SSO::Types::TooManyRequestsException] 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::SSO::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
end
end
|