Exception: Html2Pdf::Rails::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/html2pdf/rails/errors.rb

Direct Known Subclasses

ServiceUnavailableError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, msg = nil) ⇒ RequestError



9
10
11
12
13
# File 'lib/html2pdf/rails/errors.rb', line 9

def initialize(response, msg = nil)
  msg ||= "html2pdf request failed and got HTTP status #{response.code}"
  super(msg)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/html2pdf/rails/errors.rb', line 7

def response
  @response
end