Exception: Hdo::StortingImporter::DataSource::ServerError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hdo/storting_importer/data_source.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg, response) ⇒ ServerError

Returns a new instance of ServerError.



9
10
11
12
13
# File 'lib/hdo/storting_importer/data_source.rb', line 9

def initialize(msg, response)
  super(msg)

  @response = response
end

Instance Method Details

#bodyObject



19
20
21
# File 'lib/hdo/storting_importer/data_source.rb', line 19

def body
  @response.body
end

#codeObject



15
16
17
# File 'lib/hdo/storting_importer/data_source.rb', line 15

def code
  @response.status
end