Exception: RailsWebhookOutbox::DeliveryError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rails_webhook_outbox/delivery_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ DeliveryError

Returns a new instance of DeliveryError.



5
6
7
8
9
# File 'lib/rails_webhook_outbox/delivery_error.rb', line 5

def initialize(response)
  @response_code = response.code.to_i
  @response_body = response.body
  super("HTTP #{@response_code}")
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



3
4
5
# File 'lib/rails_webhook_outbox/delivery_error.rb', line 3

def response_body
  @response_body
end

#response_codeObject (readonly)

Returns the value of attribute response_code.



3
4
5
# File 'lib/rails_webhook_outbox/delivery_error.rb', line 3

def response_code
  @response_code
end