Exception: Graphiti::Errors::SideloadParamsError

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

Instance Method Summary collapse

Constructor Details

#initialize(resource_class, sideload_name) ⇒ SideloadParamsError



236
237
238
239
# File 'lib/graphiti/errors.rb', line 236

def initialize(resource_class, sideload_name)
  @resource_class = resource_class
  @sideload_name = sideload_name
end

Instance Method Details

#messageObject



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/graphiti/errors.rb', line 241

def message
  "    \#{@resource_class.name}: error occurred while sideloading \"\#{@sideload_name}\"!\n\n    The error was raised while attempting to build query parameters for the associated Resource.\n    Read more about sideload scoping here: www.graphiti.dev/guides/concepts/resources#customizing-scope\n\n    A good way to debug is to put a debugger within the 'params' block.\n\n    Here's the original, underlying error:\n\n    \#{cause.class.name}: \#{cause}\n    \#{cause.backtrace.join(\"\\n\")}\n  MSG\nend\n"