Exception: OneSignal::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/onesignal/request_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, http_status, http_body) ⇒ RequestError



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/onesignal/request_error.rb', line 6

def initialize(message, http_status, http_body)
  @http_status = http_status
  @http_body = http_body

  if @http_status
    message += " - http status : #{@http_status}"
  end

  if @http_body
    message += " - http body : #{@http_body}"
  end

  super(message)
end

Instance Attribute Details

#http_bodyObject (readonly)

Returns the value of attribute http_body.



4
5
6
# File 'lib/onesignal/request_error.rb', line 4

def http_body
  @http_body
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



3
4
5
# File 'lib/onesignal/request_error.rb', line 3

def http_status
  @http_status
end