Class: Zold::HttpError

Inherits:
HttpResponse show all
Defined in:
lib/zold/http.rb

Overview

The error, if connection fails

Instance Method Summary collapse

Methods inherited from HttpResponse

#to_s

Constructor Details

#initialize(ex) ⇒ HttpError

Returns a new instance of HttpError.



52
53
54
55
# File 'lib/zold/http.rb', line 52

def initialize(ex)
  super(ex)
  @ex = ex
end

Instance Method Details

#bodyObject



57
58
59
# File 'lib/zold/http.rb', line 57

def body
  Backtrace.new(@ex).to_s
end

#headersObject



69
70
71
# File 'lib/zold/http.rb', line 69

def headers
  {}
end

#statusObject



61
62
63
# File 'lib/zold/http.rb', line 61

def status
  599
end

#status_lineObject



65
66
67
# File 'lib/zold/http.rb', line 65

def status_line
  @ex.message || ''
end