Exception: Graphiti::Errors::Remote

Inherits:
Base
  • Object
show all
Defined in:
lib/graphiti/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(url, errors) ⇒ Remote

Returns a new instance of Remote.



34
35
36
37
# File 'lib/graphiti/errors.rb', line 34

def initialize(url, errors)
  @url = url
  @errors = errors
end

Instance Method Details

#messageObject



39
40
41
42
43
44
45
46
# File 'lib/graphiti/errors.rb', line 39

def message
  msg = "Error hitting remote API: #{@url}"
  @errors.each do |e|
    msg << "\n\n#{e[:message]}"
    msg << "\n\n#{e[:backtrace].join("\n")}\n\n\n\n" if e[:backtrace]
  end
  msg
end