Exception: Webpush::ResponseError
- Defined in:
- lib/webpush/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.
9 10 11 12 13 |
# File 'lib/webpush/errors.rb', line 9 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.
7 8 9 |
# File 'lib/webpush/errors.rb', line 7 def host @host end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/webpush/errors.rb', line 7 def response @response end |