You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Exception: Aws::Errors::NoSuchEndpointError

Inherits:
RuntimeError
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/errors.rb

Overview

Raised when attempting to connect to an endpoint and a SocketError is received from the HTTP client. This error is typically the result of configuring an invalid :region.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ NoSuchEndpointError

Returns a new instance of NoSuchEndpointError



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
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 72

def initialize(options = {})
  @context = options[:context]
  @endpoint = @context.http_request.endpoint
  @original_error = options[:original_error]
  super(<<-MSG)
Encountered a `SocketError` while attempting to connect to:

  #{endpoint.to_s}

This is typically the result of an invalid `:region` option or a
poorly formatted `:endpoint` option.

* Avoid configuring the `:endpoint` option directly. Endpoints are constructed
  from the `:region`. The `:endpoint` option is reserved for connecting to
  non-standard test endpoints.

* Not every service is available in every region.

* Never suffix region names with availability zones.
  Use "us-east-1", not "us-east-1a"

Known AWS regions include (not specific to this service):

#{possible_regions}
  MSG
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context



99
100
101
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 99

def context
  @context
end

#endpointObject (readonly)

Returns the value of attribute endpoint



101
102
103
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 101

def endpoint
  @endpoint
end

#original_errorObject (readonly)

Returns the value of attribute original_error



103
104
105
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 103

def original_error
  @original_error
end