class WebhookSystem::Job::ErrorResponse

Represents response for an exception we get when doing Faraday http call

Public Class Methods

new(exception) click to toggle source
# File lib/webhook_system/job.rb, line 19
def initialize(exception)
  @exception = exception
end

Public Instance Methods

body() click to toggle source
# File lib/webhook_system/job.rb, line 31
def body
  [@exception.class.name, @exception.message, *@exception.backtrace].join("\n")
end
headers() click to toggle source
# File lib/webhook_system/job.rb, line 27
def headers
  {}
end
status() click to toggle source
# File lib/webhook_system/job.rb, line 23
def status
  0 # no HTTP response status as we got an exception while trying to perform the request
end