Exception: PagerJudy::API::HttpError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pager_judy/api/errors.rb

Overview

An error from the PagerDuty REST API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, response) ⇒ HttpError

Returns a new instance of HttpError.



8
9
10
11
12
# File 'lib/pager_judy/api/errors.rb', line 8

def initialize(request, response)
  @request = request
  @response = response
  super(response.headers["Status"])
end

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.



14
15
16
# File 'lib/pager_judy/api/errors.rb', line 14

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



15
16
17
# File 'lib/pager_judy/api/errors.rb', line 15

def response
  @response
end