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.



59
60
61
62
# File 'lib/graphiti/errors.rb', line 59

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

Instance Method Details

#messageObject



64
65
66
67
68
69
70
71
# File 'lib/graphiti/errors.rb', line 64

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