Exception: RailsPdfRenderer::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rails/pdf/renderer/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http_response) ⇒ Error



5
6
7
# File 'lib/rails/pdf/renderer/error.rb', line 5

def initialize(http_response)
  @http_response = http_response
end

Instance Attribute Details

#http_responseObject

Returns the value of attribute http_response.



3
4
5
# File 'lib/rails/pdf/renderer/error.rb', line 3

def http_response
  @http_response
end

Instance Method Details

#messageObject



9
10
11
# File 'lib/rails/pdf/renderer/error.rb', line 9

def message
  "Got error when trying to fetch PDF from server. HTTP error #{@http_response.code} #{@http_response.message}"
end