Exception: WebPush::ResponseError
- Defined in:
- lib/web_push/errors.rb
Direct Known Subclasses
ExpiredSubscription, InvalidSubscription, PayloadTooLarge, PushServiceError, TooManyRequests, Unauthorized
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response, host) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(response, host) ⇒ ResponseError
Returns a new instance of ResponseError.
11 12 13 14 15 |
# File 'lib/web_push/errors.rb', line 11 def initialize(response, host) @response = response @host = host super "host: #{host}, #{@response.inspect}\nbody:\n#{@response.body}" end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
9 10 11 |
# File 'lib/web_push/errors.rb', line 9 def host @host end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/web_push/errors.rb', line 9 def response @response end |