Exception: MdnQuery::HttpRequestFailed
- Defined in:
- lib/mdn_query/errors.rb
Overview
The error for failed HTTP request of any kind.
Instance Attribute Summary collapse
-
#http_error ⇒ SocketError, RestClient::Exception
readonly
The original error.
-
#url ⇒ String
readonly
The URL of the request.
Instance Method Summary collapse
-
#initialize(url, error) ⇒ MdnQuery::HttpRequestFailed
constructor
Creates a new HttpRequestFailed error.
Constructor Details
#initialize(url, error) ⇒ MdnQuery::HttpRequestFailed
Creates a new HttpRequestFailed error.
37 38 39 40 |
# File 'lib/mdn_query/errors.rb', line 37 def initialize(url, error) @url = url @http_error = error end |
Instance Attribute Details
#http_error ⇒ SocketError, RestClient::Exception (readonly)
Returns the original error.
30 31 32 |
# File 'lib/mdn_query/errors.rb', line 30 def http_error @http_error end |
#url ⇒ String (readonly)
Returns the URL of the request.
27 28 29 |
# File 'lib/mdn_query/errors.rb', line 27 def url @url end |