Exception: Helo::APIError

Inherits:
Core::APIError show all
Defined in:
lib/helo/api_error.rb

Instance Attribute Summary

Attributes inherited from Core::APIError

#code, #response_body, #response_headers

Instance Method Summary collapse

Methods inherited from Core::APIError

#initialize, #message

Constructor Details

This class inherits a constructor from Helo::Core::APIError

Instance Method Details

#detailObject



7
8
9
# File 'lib/helo/api_error.rb', line 7

def detail
  json_response.fetch(:detail, ["API Error", code, @message].compact.join(" - "))
end

#errorsObject



11
12
13
14
15
# File 'lib/helo/api_error.rb', line 11

def errors
  json_response
    .fetch(:errors, {})
    .transform_keys(&:to_s)
end