Sha256: 67c7c48c3d331c5c9f497a0ffa98ef33caaa65f2004a63828a1bf16a21cf6f04

Contents?: true

Size: 376 Bytes

Versions: 21

Compression:

Stored size: 376 Bytes

Contents

module Parliament
  # A parent class that standardises the error message generated for network errors.
  #
  # @see Parliament::ClientError
  # @see Parliament::ServerError
  #
  # @since 0.6.0
  class NetworkError < StandardError
    def initialize(url, response)
      super("#{response.code} HTTP status code received from: #{url} - #{response.message}")
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
parliament-ruby-0.10.2 lib/parliament/network_error.rb
parliament-ruby-0.10.1 lib/parliament/network_error.rb
parliament-ruby-0.10.0 lib/parliament/network_error.rb
parliament-ruby-0.9.0 lib/parliament/network_error.rb
parliament-ruby-0.8.0 lib/parliament/network_error.rb
parliament-ruby-0.7.9.pre2 lib/parliament/network_error.rb
parliament-ruby-0.7.9.pre lib/parliament/network_error.rb
parliament-ruby-0.7.8 lib/parliament/network_error.rb
parliament-ruby-0.7.8.pre lib/parliament/network_error.rb
parliament-ruby-0.7.7 lib/parliament/network_error.rb
parliament-ruby-0.7.6 lib/parliament/network_error.rb
parliament-ruby-0.7.5.pre lib/parliament/network_error.rb
parliament-ruby-0.7.4 lib/parliament/network_error.rb
parliament-ruby-0.7.3.pre lib/parliament/network_error.rb
parliament-ruby-0.7.2.pre lib/parliament/network_error.rb
parliament-ruby-0.7.1.pre lib/parliament/network_error.rb
parliament-ruby-0.7.0.pre lib/parliament/network_error.rb
parliament-ruby-0.6.3 lib/parliament/network_error.rb
parliament-ruby-0.6.2 lib/parliament/network_error.rb
parliament-ruby-0.6.1 lib/parliament/network_error.rb