Exception: Parliament::NetworkError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/parliament/network_error.rb

Overview

A parent class that standardises the error message generated for network errors.

See Also:

Since:

  • 0.6.0

Direct Known Subclasses

ClientError, NoContentResponseError, ServerError

Instance Method Summary collapse

Constructor Details

#initialize(url, response) ⇒ NetworkError

Returns a new instance of NetworkError.

Since:

  • 0.6.0



9
10
11
# File 'lib/parliament/network_error.rb', line 9

def initialize(url, response)
  super("#{response.code} HTTP status code received from: #{url} - #{response.status_message}")
end