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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
# 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::Signin
# When Signin returns an error response, the Ruby SDK constructs and raises an error.
# These errors all extend Aws::Signin::Errors::ServiceError < {Aws::Errors::ServiceError}
#
# You can rescue all Signin errors using ServiceError:
#
# begin
# # do stuff
# rescue Aws::Signin::Errors::ServiceError
# # rescues all Signin 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
# * {AccessDeniedException}
# * {InternalServerException}
# * {TooManyRequestsError}
# * {ValidationException}
#
# 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 AccessDeniedException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::Signin::Types::AccessDeniedException] data
def initialize(context, message, data = Aws::EmptyStructure.new)
super(context, message, data)
end
# @return [String]
def error
@data[:error]
end
# @return [String]
def message
@message || @data[:message]
end
end
class InternalServerException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::Signin::Types::InternalServerException] data
def initialize(context, message, data = Aws::EmptyStructure.new)
super(context, message, data)
end
# @return [String]
def error
@data[:error]
end
# @return [String]
def message
@message || @data[:message]
end
end
class TooManyRequestsError < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::Signin::Types::TooManyRequestsError] data
def initialize(context, message, data = Aws::EmptyStructure.new)
super(context, message, data)
end
# @return [String]
def error
@data[:error]
end
# @return [String]
def message
@message || @data[:message]
end
end
class ValidationException < ServiceError
# @param [Seahorse::Client::RequestContext] context
# @param [String] message
# @param [Aws::Signin::Types::ValidationException] data
def initialize(context, message, data = Aws::EmptyStructure.new)
super(context, message, data)
end
# @return [String]
def error
@data[:error]
end
# @return [String]
def message
@message || @data[:message]
end
end
end
end
|