Class: Jenkins2::InternalServerError

Inherits:
Net::HTTPError
  • Object
show all
Defined in:
lib/jenkins2/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(res) ⇒ InternalServerError



33
34
35
36
37
38
39
40
# File 'lib/jenkins2/errors.rb', line 33

def initialize(res)
  case res.body
  when %r{<div id="error-description">(.+)</div>}m
    super(Regexp.last_match(1), res)
  else
    res.value
  end
end